結果

問題 No.799 赤黒かーどげぇむ
ユーザー oshiborioshibori
提出日時 2019-03-18 04:51:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 146 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2023-09-22 21:08:46
合計ジャッジ時間 1,625 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,756 KB
testcase_01 AC 15 ms
7,744 KB
testcase_02 AC 14 ms
7,776 KB
testcase_03 AC 15 ms
7,816 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,700 KB
testcase_08 AC 14 ms
7,760 KB
testcase_09 WA -
testcase_10 AC 14 ms
7,784 KB
testcase_11 AC 14 ms
7,780 KB
testcase_12 WA -
testcase_13 AC 14 ms
7,816 KB
testcase_14 AC 14 ms
7,792 KB
testcase_15 AC 14 ms
7,840 KB
testcase_16 AC 14 ms
7,780 KB
testcase_17 AC 14 ms
7,820 KB
testcase_18 AC 14 ms
7,900 KB
testcase_19 AC 15 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d=list(map(int,input().split()))

if b>d:
    a,c=c,a
    b,d=d,b

ans = (b-a+1)*(d-c+1)

if a<=c and c<=b:
    ans-= b-c+1 
    
print(ans)
0