document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include<iostream>
  2. using namespace std;
  3. /*
  4. 令f(x)為求0~x之間0的個數有多少,
  5. 即可將題目換化成[m,n]之間0的個數=f(n)-f(m-1)。
  6. */
  7.  
  8. int f91(int n){
  9.  
  10.     if(n<=100){
  11.         return f91(f91(n+11));
  12.     }
  13.     else{
  14.         return n-10;
  15.     }
  16. }
  17.  
  18. int main()
  19. {
  20.     int n;
  21.     while(cin>>n && n!=0){
  22.         cout<<"f91("<<n<<") = "<<f91(n)<<endl;
  23.     }
  24.  
  25.     return 0;
  26. }
');