Pagini recente » Cod sursa (job #235439) | Cod sursa (job #1674056) | Cod sursa (job #1040247) | Cod sursa (job #1691690) | Cod sursa (job #1095770)
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <iomanip>
#include <cmath>
#define e '\n'
using namespace std;
#define FILE "lgput"
#define INF 1023456789
#ifdef FILE
ifstream f(string (string(FILE) + ".in").c_str());
ofstream g(string (string(FILE) + ".out").c_str());
#endif
#ifndef FILE
#define f cin
#define g cout
#endif
int i, j, n, m;
#define NMOD 1999999973
int pw(int x, int y) {
if (y == 1) return x % NMOD;
if (y == 0) return 1;
int tmp = pw (x, y/2);
if (y % 2 == 0) {
return tmp * tmp % NMOD;
}
return tmp * tmp * x % NMOD;
}
int main() {
f >> n >> m;
g << pw(n, m) << e;
}