Problem Description
Loading...
Problem Analysis
The gist of the problem:
Some people love watching porn, some love building atomic bombs in basements, some love using Windows; I love computing (A1B1+A2B2+ … +AHBH)mod M
As the problem states, just compute it directly with fast exponentiation
and take the modulo according to the congruence theorem
PS: how can such people even exist in this world -.-
cpp
| |