Pagini recente » Diferente pentru problema/comoditate intre reviziile 4 si 5 | Cod sursa (job #1181322) | Cod sursa (job #1182391) | Diferente pentru problema/comoditate intre reviziile 8 si 5 | Cod sursa (job #1182413)
#include <fstream>
using namespace std;
int main(){
ifstream ifs("lgput.in");
ofstream ofs("lgput.out");
long long int x,n;ifs>>x>>n; // x^n
long long int a=1;
while(n!=0){
if(n%2){
a=(a*x)%1999999973;
x=(x*x)%1999999973;
n>>=1;
}
else{
x=(x*x)%1999999973;
n>>=1;
}
}
ofs<<a%1999999973;
}