~/algor $ cat duels/556
Duel #556
A 1v1 battle on the problem «Digital root».
Winner: Sojida Otaqulova
The winner was the first to solve it correctly — in 2 min 51 s.
Digital root
A positive integer $n$ is given. The sum of its digits is computed; if the result has more than one digit, the sum of its digits is computed, and so on until a one-digit number is obtained. That one-digit number is called the digital root of $n$. Find the digital root and how many times the digit sum was computed (if $n$ itself has one digit, the second number is $0$; for example, $9875 \to 29 \to 11 \to 2$ — the digital root is $2$, the sum was computed $3$ times).
Sample tests
9875
2 3
7
7 0
Battle results compared
1v1 reportSubmission timeline (1)
All submissionsSojida Otaqulova won
The 1v1 battle ended after a hard fight.
1v1 DUEL IS STARTING
Loading the arena...