Cod sursa(job #2606231)
Utilizator | Data | 27 aprilie 2020 12:42:02 | |
---|---|---|---|
Problema | Al k-lea termen Fibonacci | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.15 kb |
#include<fstream>
std::ifstream f("kfib.in");std::ofstream g("kfib.out");int x,y=1,z,k;int main(){f>>k;while(k--%1332028)z=(x+y)%666013,x=y,y=z;g<<x;}