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

11145번 - Is it a Number? 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB111939133437.740%

문제

This is it! You’ve finally graduated and started working. Looking forward to some really cool tasks now. While you’re skipping around in the eagerness of getting started, you’re told what your first task is - Input Validation! You should check whether the typed input is an integer number.

Time to get going! Given a sequence of characters, check whether they describe an integer number. Whitespace is allowed both before and after the number, but the rest of the input must consist of a single, non-negative integer number. Only digits will be accepted as the relevant part of the input (+ is not allowed, for instance).

입력

The first line of input contains a single number T, the number of test cases to follow. Then follow a single line for each test case; the input to be validated.

  • 0 < T ≤ 500
  • Each test case will consist of at least 1 and at most 50 characters (excluding the line break).
  • A test case can contain any character with an ASCII value between 32 and 126 (inclusive).
  • There should be no leading zeros in the output.

출력

For each test case, output a line containing the value of the number if the input is a valid integer number, or invalid input (all lowercase) if the input is not.

제한

예제 입력 1

4
 23 456
-36
 0045
 44.3

예제 출력 1

invalid input
invalid input
45
invalid input

힌트

출처

Contest > IDI Open Contest > IDI Open 2011 H번

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

출처

대학교 대회

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

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