Cod sursa(job #638325)

Utilizator andreea29Iorga Andreea andreea29 Data 20 noiembrie 2011 20:15:42
Problema Dirichlet Scor 0
Compilator cpp Status done
Runda .com 2011 Marime 0.27 kb
#include<fstream>
#include<iostream>

using namespace std;

ifstream f("dirichlet.in");
ofstream h("dirichlet.out");
int n, k, i;


int main()
{
	f>>k;
	f.close();
	n=1;
	for (i=1; i<=k-1; i++)
		n=((n%9999991)*3)%9999991;
	h<<(1+n)/2;
	h.close();
	return 0;
}