mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
53497060fc
4300-4399
6 lines
112 B
C++
6 lines
112 B
C++
Here is a function f(x):
|
|
int f ( int x ) {
|
|
if ( x == 0 ) return 0;
|
|
return f ( x / 10 ) + x % 10;
|
|
}
|