This commit is contained in:
Zengtudor 2024-08-10 12:20:24 +08:00
parent 050a50c71a
commit 63a6a481a4
2 changed files with 3 additions and 29 deletions

View File

@ -1,9 +1,7 @@
#include<bits/stdc++.h> #include<bits/stdc++.h>
using namespace std; using namespace std;
const int MAX_N = 1e5+5; // const int MAX_N = 1e5+5;
int main(){ int main(){
int n,m;
} }

View File

@ -1,28 +1,4 @@
#include <bits/stdc++.h> #include<bits/stdc++.h>
using namespace std; int main(){
#define int long long
signed main(){
int b,e,m;
#ifdef OITEST
b=2;e=10;m=9;
#endif
#ifndef OITEST
cin>>b>>e>>m;
#endif
int r=1;
while(e>0){
if (e%2==1) {
r=(r*b)%m;
}
e=(e>>1);
b=(b*b)%m;
}
cout<<r<<endl;
#ifdef OITEST
assert(r==7);
#endif
} }