Pagini recente » Statistici Dragomir Elena (elenutzaa) | Cod sursa (job #2337540) | Cod sursa (job #1434471) | Cod sursa (job #1133702) | Cod sursa (job #2577897)
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int n,m;
int rappow(int x,int put)
{
if(put==0)return 1;
if(put%2) return (x*rappow(x,put-1))%1999999973;
if(put%2==0)
{
int p=(rappow(x,put/2))%1999999973;
return (p*p)%1999999973;
}
}
int main()
{
f>>n>>m;
g<<rappow(n,m);
g.close();
return 0;
}