Pagini recente » Cod sursa (job #2520440) | Istoria paginii runda/preonigim2015 | Cod sursa (job #693067) | Cod sursa (job #1397425) | Cod sursa (job #2228352)
#include <iostream>
#include <fstream>
using namespace std;
ifstream f; ofstream g;
long long power(long long x, long long n)
{
if (n == 0) return (1);
else if (n == 1) return (x % 1999999973);
else if (n % 2) power((x * x) % 1999999973, (n - 1) / 2);
else power((x * x) % 1999999973, 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);
g.close();
return (0);
}