Demo entry 6770672



Submitted by 反对法 on Nov 14, 2018 at 10:17
Language: C++. Code size: 232 Bytes.

#define LL long long 
// 快速幂 计算 x^a % P 
LL Power_Mod(LL x,LL a,LL P)
    LL res=1;// 答案值
    	if(a&1)res=res*x%P;// 如a的第i位为1,答案值乘上x^(2^i)
    return res;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).