結果

問題 No.799 赤黒かーどげぇむ
ユーザー brthyyjpbrthyyjp
提出日時 2020-04-07 16:48:07
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 71,608 KB
最終ジャッジ日時 2023-09-22 00:02:21
合計ジャッジ時間 3,533 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,252 KB
testcase_01 AC 73 ms
71,560 KB
testcase_02 AC 73 ms
71,396 KB
testcase_03 AC 73 ms
71,368 KB
testcase_04 AC 73 ms
71,264 KB
testcase_05 AC 73 ms
71,428 KB
testcase_06 AC 73 ms
71,268 KB
testcase_07 AC 73 ms
71,376 KB
testcase_08 AC 72 ms
71,268 KB
testcase_09 AC 73 ms
71,552 KB
testcase_10 AC 74 ms
71,452 KB
testcase_11 AC 75 ms
71,608 KB
testcase_12 AC 76 ms
71,108 KB
testcase_13 AC 73 ms
71,444 KB
testcase_14 AC 73 ms
71,396 KB
testcase_15 AC 74 ms
71,372 KB
testcase_16 AC 73 ms
71,292 KB
testcase_17 AC 72 ms
71,344 KB
testcase_18 AC 72 ms
71,376 KB
testcase_19 AC 72 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c, d = map(int, input().split())
s = set(range(c, d+1))
cnt = 0
for i in range(a, b+1):
    if i in s:
        cnt += 1
print((b-a+1)*(d-c+1)-cnt)
0