Pagini recente » Cod sursa (job #2342548) | Cod sursa (job #2331397) | Cod sursa (job #1170706) | Cod sursa (job #40639) | Cod sursa (job #1365495)
#include <fstream>
#include <vector>
using namespace std;
const int mod = 1999999973;
inline int lgpow(int a, int b) {
a %= mod;
int ans = 1;
for( ; b ; b >>= 1) {
if(b & 1)
ans = (1LL * ans * a) % mod;
a = (1LL * a * a) % mod;
}
return ans;
}
int main() {
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int n, p;
fin >> n >> p;
fout << lgpow(n, p) << '\n';
}