This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |