leetle

Daily challenge for 2025-10-18

291. Add Digits

Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.

Example:
Input: num = 38
Output: 2
Explanation: 3 + 8 = 11, 1 + 1 = 2

Run this challenge interactively in Python or JavaScript when the app loads.