#include <iostream> using namespace std; int main() {     int n;     while (cin >> n){         if (n <= 3) {             cout << 0<<endl;             continue;         }         int fst = 1, scd = 2, ct = 2;         int cur = fst + scd;         while (cur <= n)         {             ++ct;             fst = scd;             scd = cur;             cur = fst + scd;         }         cout << n - ct<<endl;     } } 10%,求找错
点赞 2
牛客网
牛客企业服务