Cod sursa(job #1872005)
| Utilizator | Data | 7 februarie 2017 21:04:16 | |
|---|---|---|---|
| Problema | Al k-lea termen Fibonacci | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.17 kb |
#include <fstream>
using namespace std;
ifstream f("kfib.in");
ofstream g("kfib.out");
int main()
{int x=0,y=1,z,k;f>>k;
while(k--%1332028)z=(x+y)%666013,x=y,y=z;g<<x;
}
