Pagini recente » Diferente pentru problema/royfloyd intre reviziile 28 si 29 | Cod sursa (job #1369567) | Diferente pentru problema/royfloyd intre reviziile 37 si 20 | Cod sursa (job #3358687) | Cod sursa (job #2143514)
#include <fstream>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int rise(int a,int b)
{
if (b==0)
{
return 1;
}
int x=rise (a,b/2);
if (b%2==0)
{
return (x*x)%1999999973;
}
else
{
return (((x*x)%1999999973)*a)%1999999973;
}
}
int main()
{
int a,b;
f>>a>>b;
g<<rise(a,b);
return 0;
}