Logo
(追記) (追記ここまで)

6737번 - Parsing Real Numbers 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB37191858.065%

문제

Write a program that read a line of input and checks if the line contains a valid real number. Real numbers may have a decimal point, an exponent (starting with the character e or E), or both. Additionally, it has the usual collection of decimal digits. If there is a decimal point, there must be at least one digit on each side of the point. There may be a plus or minus sign in front of the number, or the exponent, or both (without any blank characters after the sign). Exponents are integers (not having decimal points). There may be blank characters before or after a number, but not inside it. Note that there is no bound on the range of the numbers in the input, but for the sake of simplicity, you may assume the input strings are not longer than 1000 characters.

입력

The first line of the input contains a single integer T which is the number of test cases, followed by T lines each containing the input line for a test case.

출력

The output contains T lines, each having a string which is LEGAL or ILLEGAL.

제한

예제 입력 1

2
 1.5e+2
3.

예제 출력 1

LEGAL
ILLEGAL

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > Iran Internet Programming Contest > IIPC 2006 B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /