시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
3 초 | 256 MB | 83 | 54 | 43 | 64.179% |
Given a positive integer U, find the largest integer L such that L ≤ U and L does not contain any digit more than twice.
The input consists of a single line that contains an integer U (1 ≤ U ≤ 1018).
Output a line with an integer representing the largest number less than or equal to U that does not contain any digit more than twice.
2210102960
2210099887
1000000000000000000
998877665544332211
1001223343
998877665
20152015
20152015
ICPC > Regionals > Latin America > Latin America Regional Contests 2015 A번