Pagini recente » Cod sursa (job #2677992) | Cod sursa (job #1522334) | Cod sursa (job #1592966) | Cod sursa (job #6072) | Cod sursa (job #1414345)
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fs first
#define sc second
#define pob pop_back
#define pub push_back
#define eps 1E-7
#define sz(a) a.size()
#define count_one __builtin_popcount;
#define count_onell __builtin_popcountll;
#define fastIO ios_base::sync_with_stdio(false)
#define PI (acos(-1.0))
#define linf (1LL<<62)//>4e18
#define inf (0x7f7f7f7f)//>2e9
#ifndef ONLINE_JUDGE
ifstream fin("lgput.in");
ofstream fout("lgput.out");
#endif
const int MAXN = 100;
const int MOD = 1999999973;
typedef long long ll;
ll lgput(int a, int exp) {
ll sol = 1;
ll base = a;
for(int k = 0; (1 << k) <= exp; ++k) {
if( ((1 << k) & exp) > 0 )
sol = (sol * base) % MOD;
base = (base * base) % MOD;
}
return sol;
}
void read() {
int n, m;
fin >> n >> m;
fout << lgput(n, m) << "\n";
}
int main() {
read();
return 0;
}