Given an integer num, repeatedly sum all of its digits until the resulting value is a single digit, then return that value.
Note: Could you solve this without any loop or recursion in
runtime?
Constraints:
num
Given an integer num, repeatedly sum all of its digits until the resulting value is a single digit, then return that value.
Note: Could you solve this without any loop or recursion in
runtime?
Constraints:
num