Simple Math

AtCoder
IDarc107_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
1 2 3
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$.
Input #2
1000000000 987654321 123456789
Output #2
951633476

Be sure to compute the value modulo $998244353$.
API Response (JSON)
{
  "problem": {
    "name": "Simple Math",
    "description": {
      "content": "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$",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "arc107_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Given are three positive integers $A$, $B$, and $C$. Compute the following value modulo $998244353$:\n$\\sum_{a=1}^{A} \\sum_{b=1}^{B} \\sum_{c=1}^{C} abc$\n\n## Constraints\n\n*   $1 \\leq A, B, C \\leq 10^9$\n...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments