1 #include <iostream> 2 using namespace std; 3 int f(int n) { 4 if(n>=50025002) 5 return n-5; 6 else 7 return f(f(n+2005)); 8 } 9 int main() { 10 int n; 11 while(cin>>n) 12 cout << f(n); 13 }
C++小程序 (2010-01-02 21:55:08由czk编辑)