long long 啦啦啦啦啦
by faker121 @ 2017-10-13 15:18:05
快速幂不取模???
by 叫我彪哥 @ 2017-10-25 13:45:53
```cpp
#include<iostream>
using namespace std;
long long x,a,b,c,s=1;
int main()
{
cin>>a>>b>>c;
x=a;
/*for(int i=0;i<=31;i++)
{
if((b&(1<<i))>>i==1) s=(s*x)%c;
x=(x*x)%c;
}*/
while(b>0)
{
if(b%2==1) s=(s*x)%c;
b/=2;
x=(x*x)%c;
}
cout<<s;
//system("pause");
}
我这里给你发一个快速幂的代码,可以参考一下。
```
by lzhor @ 2017-10-28 10:04:19