Maximum Number
Easy
Execution time limit is 0.1 seconds
Runtime memory usage limit is 256 megabytes
You are given an integer . You can take the first digit of this number and move it to the end of the number, leaving the order of the remaining digits unchanged. You are allowed to repeat this operation any number of times. Determine the maximum number that can be obtained as a result of such operations.
Input
The input is presented as a single natural number .
Output
Output a single value – the largest number that can be obtained by performing such permutations.
Examples
Input #1
Answer #1
Note
Initial number:
After the first permutation, we get:
Perform another permutation:
Submissions 110
Acceptance rate 26%