This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub mugen1337/procon
#include "Math/pow_mod.hpp"
// a^n (mod m) ll pow_mod(ll a,ll n,ll m){ ll ret=1; while(n){ if(n&1) ret=ret*a%m; a=(a*a)%m; n/=2; } return ret; }
#line 1 "Math/pow_mod.hpp" // a^n (mod m) ll pow_mod(ll a,ll n,ll m){ ll ret=1; while(n){ if(n&1) ret=ret*a%m; a=(a*a)%m; n/=2; } return ret; }