「JoyOI1118 – 1119」a^b1 – 2

2014年1月27日2,5340

a^b

描述 Description
求a^b
由于结果可能很大,我们现在只需要知道这个值
mod 1012就可以了(为什么是1012?我的生日)
a<1000000
b<1000000
输入格式 InputFormat
第一行两个数 a b
输出格式 OutputFormat
一行,就是mod 1012的值
样例输入 SampleInput
2 2
样例输出 SampleOutput
4
代码
快速幂

1119有多组数据

 

avatar
  Subscribe  
提醒