标签:
Time Limit: 1000MS | Memory Limit: 30000K | |
Total Submissions: 5087 | Accepted: 2959 |
Description
Input
Output
(A1B1+A2B2+ ... +AHBH)mod M.
Sample Input
3
16
4
2 3
3 4
4 5
5 6
36123
1
2374859 3029382
17
1
3 18132
Sample Output
2
13195
13
Source
Raising Modulo Numbers ---- 快速幂
标签:
原文地址:http://blog.csdn.net/u012965373/article/details/45166331