题解 | #The Biggest Water Problem#
The Biggest Water Problem
http://www.nowcoder.com/practice/435aa556e093463891f6da7d322140a4
int output(int n) {
while (1) {
n = n % 10 + n / 10;
if (n >= 10) output(n);
else return n;
}
}
int main() {
int n, sum;
scanf("%d", &n);
printf("%d", output(n));
return 0;
}