Pagini recente » Cod sursa (job #2661321) | Cod sursa (job #3202970) | Cod sursa (job #1792916) | Cod sursa (job #1599417) | Cod sursa (job #3135196)
#include <bits/stdc++.h>
#define optim ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define ll long long
#define ull unsigned long long
#define ld long double
#define pb push_back
#define let auto
#define popcount __builtin_popcount
#define ctzll __builtin_ctzll
#define clzll __builtin_clzll
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const ull mod = 1999999973;
ull POW(ull x, ull p){
if(p == 0) return 1;
if(p == 1) return x;
if(p % 2 == 0){
ull n = POW(x, p/2);
return (n * n) % mod;
}
else {
ull n = POW(x, p - 1);
return (x * n) % mod;
}
}
int main()
{
ull a, b;
fin>>a>>b;
fout<<POW(a, b);
return 0;
}