Pagini recente » Diferente pentru problema/graf2 intre reviziile 28 si 12 | Cod sursa (job #661357) | Cod sursa (job #1000208) | Rating Mindrila Claudiu (mndclaudiu) | Cod sursa (job #1001138)
#include <fstream>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
long long a,b;
long long up(long long a,long long b){
long long p=a,k=1,s;
s=1;
while(b!=0){
if(b%2)
s*=p,s%=1999999973;
b/=2;
p*=p;
p%=1999999973;
}
return s;
}
int main(void){
register int i,j;
f>>a>>b;
long long sol=up(a,b);
g<<sol;
return 0;
}