fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define fi first
  5. #define se second
  6. #define MOD 1000000007
  7. #define FOR(i,a,b) for (int i = (a);i <= (b);i++)
  8. #define FOD(i,a,b) for (int i = (b);i >= (a);i--)
  9. #define ALL(x) (x).begin(),(x).end()
  10. #define ii pair<int,int>
  11. #define iii pair<int,pair<int,int>>
  12. //const int MOD = 998244353;
  13. const int MAXN = 1e5+7;
  14. ll f[MAXN];
  15. int main(){
  16. ios_base::sync_with_stdio(false);
  17. cin.tie(0); cout.tie(0);
  18. FOR(i,1,1e4){
  19. f[1] = f[2] = 1;
  20. int j = 3;
  21. while((f[j - 1] + f[j - 2]) % 10000 != 0){
  22. f[j] = f[j - 1] + f[j - 2];
  23. f[j] = f[j] % 10000;
  24. j++;
  25. }
  26. }
  27. return (0^0);
  28. }
  29.  
Success #stdin #stdout 0.31s 5272KB
stdin
Standard input is empty
stdout
Standard output is empty