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

6751번 - From 1987 to 2013 다국어

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

문제

You might be surprised to know that 2013 is the first year since 1987 with distinct digits. The years 2014, 2015, 2016, 2017, 2018, 2019 each have distinct digits. 2012 does not have distinct digits, since the digit 2 is repeated.

Given a year, what is the next year with distinct digits?

입력

The input consists of one integer Y (0 ≤ Y ≤ 10000), representing the starting year.

출력

The output will be the single integer D, which is the next year after Y with distinct digits.

제한

예제 입력 1

1987

예제 출력 1

2013

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2013 > CCC 2013 Junior Division 3번

Olympiad > Canadian Computing Competition & Olympiad > 2013 > CCC 2013 Senior Division 1번

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

출처

대학교 대회

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

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