Pagini recente » Cod sursa (job #1195144) | Cod sursa (job #2817399) | Cod sursa (job #3123919) | Cod sursa (job #1955050) | Cod sursa (job #2908855)
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
ull a,b;
const long modulo=1999999973;
ull putere(ull a,ull b){
/// varianta operatii pe biti
ull p=1;
for (ull i=1;i<=b;i=i<<1)
{
if (b&i){
p*=a;
p%=modulo;
}
a*=a;
a%=modulo;
}
return p;
}
void solve(){
fin>>a>>b;
///a la putere b
ull ans=putere(a,b);
fout<<ans;
}
int main(){
solve();
}