結果
| 問題 |
No.2001 Distanced Triple
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2022-07-08 21:57:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 229 bytes |
| コンパイル時間 | 753 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-28 05:24:21 |
| 合計ジャッジ時間 | 2,392 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 2 RE * 13 |
ソースコード
from math import comb
l, r = map(int, input().split())
a, b, c = map(int, input().split())
k = r - l - a - b
d = c - a - b
ans = comb(k + 3, 3)
if d > 0:
ans -= - d * (d + 1) * (-3 * k + 2 * d - 5) // 6
print(ans % 998244353)
Kude