求a^b%c(b很大,歐拉降冪)

bzoj 3884c++   思路:spa f(p) = 2*2*2*2……*2*2;code f(p) = 2^( 2*2*2……*2*2%phi(p)+phi(p) )%p;遞歸 f(p) = 2^( f(phi(p)) + phi(p) )%p;it 遞歸求解便可。class   #include <bits/stdc++.h> using namespace std; typedef lo
相關文章
相關標籤/搜索