DESCENDING
Xem dạng PDF
Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch, TEXT
Descending Digits
Given a positive integer N, determine whether all digits of N are in descending order from left to right.
Digits are considered to be in descending order if each digit is greater than or equal to the digit that follows it.
Input
The input contains a single integer N.
0 <= N <= 10^16
Output
Output YES if all digits of N are in descending order.
Otherwise, output NO.
Example 1
Input
988765553200
Output
YES
Example 2
Input
765587654321
Output
NO
Bình luận