One morning, completely by chance, Mirko found a positive integer
Input
The first and only line of input contains the integer
Output
The first and only line of output must contain the required number from the task, if it exists. If it doesn't exist, output -1
.
Sample Input 1
Copy
30
Sample Output 1
Copy
30
Sample Input 2
Copy
102
Sample Output 2
Copy
210
Sample Input 3
Copy
2931
Sample Output 3
Copy
-1
Comments
This problem should also be tagged as greedy algorithms.
Why does this problem have partial points? There aren't really any corner cases or increase in difficulty.
Maybe that some solutions TLE?
https://dmoj.ca/submission/98133