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

26552번 - Zero 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB26723320388.261%

문제

You’re writing the positive integers in increasing order starting from one. But you’ve never learned the digit zero, and thus omit any number that contains a zero in any position. The first ten integers you write are: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 11. You have just written down the integer k (which is guaranteed to not contain the digit zero). What will be the next integer that you write down?

입력

The first line will contain a single integer n that indicates the number of data sets that follow. Each data set will consist of a single line containing the integer k (1 ≤ k ≤ 999,999). It is guaranteed that k does not contain the digit zero.

출력

For each data set print, on a single line, the next integer you will be writing down.

제한

예제 입력 1

2
99
1234

예제 출력 1

111
1235

힌트

출처

School > PLU High School Programming Contest > PLU 2018 > Novice 9번

School > PLU High School Programming Contest > PLU 2018 > Advanced 1번

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

출처

대학교 대회

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

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