This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include<bits/stdc++.h>
usingnamespacestd;
//计算2^100 %13的值
intfun1(inta,intp,intmod){
//前提p是质数,a不是p的倍数,有费马小定理
intans=pow(a,p%(mod-1));//利用费马小定理,降幂 p'= p % (mod - 1),然后再计算 pow(a,p'),这个就小多了