C++小程序

返回“程序设计语言”

#include <iostream>
using namespace std;
int f(int n) {
    if(n>=50025002)
        return n-5;
    else
        return f(f(n+2005));
}
int main() {
    int n;
    while(cin>>n)
        cout << f(n);
}