Submit solution
Points:
1
Time limit:
0.05s
Memory limit:
12M
Author:
Problem type
Allowed languages
Python
Description
Lee once saw a way to calculate secret number, and he's curious about how he can mutate the problem, so he came up with an idea, calculate the secret number's secret factor.
Lee's Secret Primary Factor's calculating steps are:
Given a interger input
- combine 's odd and even digits into 2 numbers
- subtract 2 numbers and take it's absolute
- calculate the largest primary factor
- the result is what Lee wanted
For example:
Odd | Even |
---|---|
Therefore, the Secret Primary Factor of is
Constraints
The digit count of input ():
The digit count of output:
Sample IO
Input | Output |
---|---|
48422 | 5 |
2244782037 | 7 |
1243293377632122 | 19 |
Comments