
Desicription
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
Example:
1 |
Input: 38 |
Solution
1 |
class { |

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
Example:
1 |
Input: 38 |
1 |
class { |
近期评论