Cod sursa(job #159798)
| Utilizator | Data | 14 martie 2008 13:41:45 | |
|---|---|---|---|
| Problema | Ridicare la putere in timp logaritmic | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.26 kb |
#include<math.h>
#include<fstream.h>
#include<iostream.h>
#define m 1999999973
using namespace std ;
int main()
{
long long a,b;
ifstream f ("lgput.in");
f>>a>>b;
a=log(a);
ofsteam o ("lgput.out");
o<<(exp(a*b)%m);
getch();
return 0;}