fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int getAns() {
  5. long long a = 0, b = 1;
  6. long long minn = 1234567890, maxx = 9876543210;
  7. int ans = 0;
  8.  
  9. while(b <= maxx) {
  10. if(b >= minn) ans++;
  11. long long c = a + b;
  12. a = b;
  13. b = c;
  14. }
  15.  
  16. return ans;
  17. }
  18.  
  19. int main() {
  20. cout << getAns();
  21. return 0;
  22. }
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
4