#arc107a. [arc107_a]Simple Math
[arc107_a]Simple Math
Problem Statement
Given are three positive integers , , and . Compute the following value modulo :
$\\sum_{a=1}^{A} \\sum_{b=1}^{B} \\sum_{c=1}^{C} abc$
Constraints
Input
Input is given from standard input in the following format:
Output
Print the value modulo .
Sample Input 1
1 2 3
Sample Output 1
18
We have: $(1 \\times 1 \\times 1) + (1 \\times 1 \\times 2) + (1 \\times 1 \\times 3) + (1 \\times 2 \\times 1) + (1 \\times 2 \\times 2) + (1 \\times 2 \\times 3) = 1 + 2 + 3 + 2 + 4 + 6 = 18$.
Sample Input 2
1000000000 987654321 123456789
Sample Output 2
951633476
Be sure to compute the value modulo .