Cod sursa(job #1599286)
| Utilizator | Data | 13 februarie 2016 19:06:01 | |
|---|---|---|---|
| Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.32 kb |
#include <fstream>
#include <cmath>
#define MOD 1999999973
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
unsigned long long int N, P, i;
unsigned long long int sol;
int main ()
{
fin >> N >> P;
sol = pow (N, P);
sol %= MOD;
fout << sol;
return 0;
}
