solution
欧拉函数法可以解决模幂运算
#include<stdio.h>
#include<math.h>
int main(){int a, m, n, r1;scanf("%d%d%d", &a, &m, &n);while(m){if(m&1) r(r*a)%n;a(a*a)%n;m>>1; }printf("%d", r);return 0;
}给定伪…
cumprod取自“cumulative product”的缩写,即“累计乘法”。 数学公式为: y i x 1 x 2 x 3 . . . x i y_ix_1\times{x_2}\times{x_3}\times{...}\times{x_i} yix1x2x3...xi 官方链接:torch.cumprod
用法:
impo…