Ładowanie zadania…
Sometimes a large number is reduced to a single check digit, as in simple validations and number tricks. Given a non-negative integer num, add all of its digits. If the result still has more than one digit, repeat the process until only one digit remains, then return it.
3820099def add_digits(num: int) -> int:
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj się38200991991123456123445