COCI00056
Veci
레이팅
의견: 0
설명
Your program will be given an integer \(X\). Find the smallest number larger than \(X\) consisting of the same digits as \(X\).
제약
입력 형식
The first line of input contains the integer \(X\) (\(1 \le X \le 999999\)). The first digit in \(X\) will not be a zero.
출력 형식
Output the result on a single line. If there is no such number, output \(0\).
서브태스크
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 25점 |
예제 1
입력
156출력
165예제 2
입력
330출력
0예제 3
입력
27711출력
71127문제 정보
태그
평가 및 의견
Veci
개요
Log in to rate problems.
개별 의견
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Veci
게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다.
로그인하고 제출하기