Submission #9282

#TimeUsernameProblemLanguageResultExecution timeMemory
9282dolpang2Phibonacci (kriii2_P)C++14
0 / 4
160 ms262144 KiB
#include <cstdio> #include <iostream> #include <string> #include <vector> int main() { std::vector<long long> fibo; fibo.push_back(0); fibo.push_back(1); long long n; long long k; scanf("%lld%lld", &n, &k); if (k == 1) { for (long long i = 2; i <= n; ++i) { fibo.push_back(fibo[i - 1] + fibo[i - 2]); } std::cout << fibo[n] % 1000000007 << " " << fibo[n - 1] % 1000000007; } else { puts("no"); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...