Cod sursa(job #1396621)
| Utilizator | Data | 22 martie 2015 19:25:48 | |
|---|---|---|---|
| Problema | Ridicare la putere in timp logaritmic | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.25 kb |
#include <fstream>
using namespace std;
long long n,p,x,i;
int main()
{
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
fin>>n>>p;
x=1;
for (i=1;i<=p;i++)
x=(x*n)%1999999973;
fout<<x;
return 0;
}
