Pagini recente » Cod sursa (job #2315220) | Cod sursa (job #2559245) | Cod sursa (job #212665) | Cod sursa (job #2366622) | Cod sursa (job #1342702)
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <fstream>
using namespace std;
int main()
{
long long baza,putere,rez=1;
ifstream f("lgput.in");
f>>baza>>putere;
f.close();
long long adun=baza;
while (putere>0)
{ if (putere%2!=0) rez=(rez*adun)%1999999973;
adun=(adun%1999999973)*(adun%1999999973)%1999999973;
putere=putere/2;
}
ofstream g("lgput.out");
g<<rez;
g.close();
return 0;
}
``