제출 #9403

#제출 시각아이디문제언어결과실행 시간메모리
9403dolpang2Phibonacci (kriii2_P)C++14
0 / 4
0 ms1088 KiB
#include <cstdio> #include <vector> const int kModulo = 1000000007; int main() { int n = 0; int k = 0; scanf("%d%d", &n, &k); int x = 0; int y = 1; for (int i = 2; i <= n; ++i) { if (x > kModulo) x %= kModulo; if (y > kModulo) y %= kModulo; int temp = (x + y) % kModulo; x = y; y = temp; } printf("%d %d", y, x); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...