The input file will contain a list of positive integers, one per line. The end of the input will be indicated by an integer value of zero.
请先登录再刷题,不会做的题目右上可以查看题解和答案~
The input file will contain a list of positive integers, one per line. The end of the input will be indicated by an integer value of zero.
For each integer in the input, output its digital root on a separate line of the output.
24 39 0
6 3
北京大学机试题