这题整么做
在我老师OJ上下面的代码通不过。。。
#include<bits/stdc++.h>
using namespace std;
int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = (x << 1) + (x << 3) + (ch ^ 48);
ch = getchar();
}
return x * f;
}
int f(int x) {
if (x <= 100) {
return f(f(x + 11));
}
return x - 10;
}
int main() {
unsigned long long n = 1;
while (1) {
n = read();
if(n==0){
break;
}
cout << f(n);
}
return 0;
}