Submission #9559

#TimeUsernameProblemLanguageResultExecution timeMemory
9559yukarikoPhibonacci (kriii2_P)C11
0 / 4
0 ms1088 KiB
#include <stdio.h> #include <string.h> int main(){ int i,n,k; unsigned long long p[2]; scanf("%d %d",&n,&k); p[0]=0; p[1]=1; for(i=2;i<=n;i++){ p[i%2] = p[i%2]+p[(i+1)%2]; } if(n<1) printf("0 1\n"); else printf("%lld %lld\n",p[(i+1)%2]%1000000007,p[i%2]%1000000007); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...