Cod sursa(job #403268)
Utilizator | Data | 24 februarie 2010 19:37:15 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.2 kb |
#include<stdio.h>
#include<math.h>
long s,n,p;
int main()
{freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
scanf("%ld%ld",&n,&p);
s=pow(n,p);
printf("%ld",s%1999999973);
return 0;
}