結果

問題 No.2001 Distanced Triple
ユーザー tassei903tassei903
提出日時 2022-07-09 11:59:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 70,932 KB
最終ジャッジ日時 2023-08-28 22:41:43
合計ジャッジ時間 3,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,796 KB
testcase_01 AC 70 ms
70,528 KB
testcase_02 AC 71 ms
70,760 KB
testcase_03 AC 69 ms
70,808 KB
testcase_04 AC 74 ms
70,900 KB
testcase_05 AC 71 ms
70,720 KB
testcase_06 AC 71 ms
70,756 KB
testcase_07 AC 72 ms
70,572 KB
testcase_08 AC 71 ms
70,580 KB
testcase_09 AC 71 ms
70,900 KB
testcase_10 AC 72 ms
70,896 KB
testcase_11 AC 70 ms
70,752 KB
testcase_12 AC 71 ms
70,720 KB
testcase_13 AC 70 ms
70,720 KB
testcase_14 AC 71 ms
70,600 KB
testcase_15 AC 71 ms
70,528 KB
testcase_16 AC 72 ms
70,800 KB
testcase_17 AC 71 ms
70,804 KB
testcase_18 AC 72 ms
70,728 KB
testcase_19 AC 71 ms
70,424 KB
testcase_20 AC 74 ms
70,644 KB
testcase_21 AC 72 ms
70,732 KB
testcase_22 AC 72 ms
70,668 KB
testcase_23 AC 72 ms
70,720 KB
testcase_24 AC 71 ms
70,568 KB
testcase_25 AC 73 ms
70,676 KB
testcase_26 AC 72 ms
70,752 KB
testcase_27 AC 71 ms
70,932 KB
testcase_28 AC 71 ms
70,904 KB
testcase_29 AC 72 ms
70,724 KB
testcase_30 AC 72 ms
70,832 KB
testcase_31 AC 71 ms
70,704 KB
testcase_32 AC 72 ms
70,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
l,r = na()
mod = 998244353
a,b,c = na()
z = max(a+b,c)
f = a+b
if z > r-l:
    print(0)
else:
    print(-(l-r+z-2)*(l-r+z-1)*(3*f+l-r-2*z-3)//6%mod)

0