We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chứng minh công thức tổng quát theo phương trình toán học:
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1e9+7; map <ll, ll> F; ll fibo(int n) { if(F.count(n)) return F[n]; int t = n/2; if(n & 1) return F[n] = (fibo(t)*fibo(t + 1) + fibo(t - 1)*fibo(t)) % MOD; else return F[n] = (fibo(t)*fibo(t) + fibo(t - 1)*fibo(t - 1)) % MOD; } int main() { ll n = 2000000000; F[1] = F[1] = 1; cout << (n == 0 ? 0 : fibo(n - 1)) << '\n'; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Chứng minh công thức tổng quát theo phương trình toán học:
The text was updated successfully, but these errors were encountered: