201070: [AtCoder]ARC107 A - Simple Math

Memory Limit:1024 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $300$ points

Problem Statement

Given are three positive integers $A$, $B$, and $C$. Compute the following value modulo $998244353$:

$\sum_{a=1}^{A} \sum_{b=1}^{B} \sum_{c=1}^{C} abc$

Constraints

  • $1 \leq A, B, C \leq 10^9$

Input

Input is given from standard input in the following format:

$A$ $B$ $C$

Output

Print the value modulo $998244353$.


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 $998244353$.

Input

题意翻译

给定正整数 $ A, B, C $ 求 $ \sum_{a=1}^{A}\ \sum_{b=1}^{B}\ \sum_{c=1}^{C}\ abc \mod 998244353 $

加入题单

上一题 下一题 算法标签: