Submit | All submissions | Best solutions | Back to list |
EI2021Q13 - DESCENDING |
Given a positive integer N (0 ≤ N ≤ 1016). Write a program to check if all digits in N are in descending order?
Input
an integer N (0 ≤ N ≤ 1016)
Output
Write YES if all digits in N are in descending, otherwise write NO
Example
Input: 988765553200 Output: YES Input: 765587654321 Output: NO
Added by: | Ha Minh Ngoc |
Date: | 2021-08-25 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |