- a^b:快速幂的应用
链接:https://ac.nowcoder.com/acm/contest/996/A
来源:牛客网
求 a 的 b 次方对 p 取模的值,其中 0≤a,b,p≤1090 \leq a,b,p \leq 10^90≤a,b,p≤109
天真的人,很容易写出下面的代码:
#include<stdio.h>
#include<math.h>
int a,b,p;
main(){
scanf(</
链接:https://ac.nowcoder.com/acm/contest/996/A
来源:牛客网
求 a 的 b 次方对 p 取模的值,其中 0≤a,b,p≤1090 \leq a,b,p \leq 10^90≤a,b,p≤109
天真的人,很容易写出下面的代码:
#include<stdio.h>
#include<math.h>
int a,b,p;
main(){
scanf(</