Pagini recente » Cod sursa (job #2378181) | Cod sursa (job #1392666) | Cod sursa (job #1015000) | Cod sursa (job #1048340) | Cod sursa (job #2228345)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f; ofstream g;
long long power(int x, int n)
{
if (n == 0) return (1);
else if (n == 1) return (x);
else if (n % 2) power(x * x, (n - 1) / 2);
else power(x * x, n / 2);
}
int main(void)
{
long long n, m;
f.open("lgput.in");
f >> n >> m;
f.close();
g.open("lgput.out");
g << power(n, m) % 1999999973;
g.close();
return (0);
}