Pagini recente » Cod sursa (job #855338) | Cod sursa (job #2322772) | Cod sursa (job #1935487) | Cod sursa (job #1217092) | Cod sursa (job #2347484)
#include <iostream>
#include <cmath>
#include <iomanip>
#include <fstream>
#include <string.h>
using namespace std;
int const MOD = 666013;
int fiboNum(int k) {
int term1 = 1, term2 = 1, result;
for(int i = 3; i <= k; i++) {
result = (1LL * (term1 + term2)) % MOD;
term1 = (1LL * term2) % MOD;
term2 = (1LL * result) % MOD;
}
return result;
}
int main() {
ifstream fin("kfib.in");
ofstream fout("kfib.out");
int k;
fin >> k;
fout << k;
return 0;
}