Cod sursa(job #158589)
Utilizator | Data | 13 martie 2008 18:26:07 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.32 kb |
#include <stdio.h>
#include <string.h>
#include<math.h>
#define m 1999999973
int main()
{
unsigned int n, p;
long long sol;
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
scanf("%d %d", &n, &p);
sol=pow(n,p);
printf("%lld\n", sol%m);
}