Submission #17769178


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
ll A, B, C; cin >> A >> B >> C;
ll MOD = 998244353;
ll sumA = A * (A + 1) / 2 % MOD;
ll sumB = B * (B + 1) / 2 % MOD;
ll sumC = C * (C + 1) / 2 % MOD;
ll ans = sumA * sumB % MOD;
ans = ans * sumC % MOD;
cout << ans << '\n';
return 0;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll A, B, C; cin >> A >> B >> C;

  ll MOD = 998244353;
  ll sumA = A * (A + 1) / 2 % MOD;
  ll sumB = B * (B + 1) / 2 % MOD;
  ll sumC = C * (C + 1) / 2 % MOD;

  ll ans = sumA * sumB % MOD;
  ans = ans * sumC % MOD;
  cout << ans << '\n';
  return 0;
}

Submission Info

Submission Time
Task A - Simple Math
User nakaken88
Language C++ (GCC 9.2.1)
Score 300
Code Size 402 Byte
Status AC
Exec Time 6 ms
Memory 3620 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 8
Set Name Test Cases
Sample example_00, example_01
All example_00, example_01, max_random_00, max_random_01, max_random_02, small_00, small_01, small_02
Case Name Status Exec Time Memory
example_00 AC 6 ms 3512 KB
example_01 AC 2 ms 3548 KB
max_random_00 AC 2 ms 3544 KB
max_random_01 AC 2 ms 3548 KB
max_random_02 AC 2 ms 3584 KB
small_00 AC 2 ms 3620 KB
small_01 AC 1 ms 3468 KB
small_02 AC 3 ms 3500 KB


2025-04-08 (Tue)
19:57:39 +00:00