結果

問題 No.799 赤黒かーどげぇむ
ユーザー monburan_0401
提出日時 2019-05-04 02:16:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2025-01-02 20:28:32
合計ジャッジ時間 1,811 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding utf-8

s = str(input())
s = s.split(" ")

a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])

if a < c:
    e = b - c + 1
    if d < b:
        e -= (b - d + 1)
else:
    e = d - a + 1
    if b < d:
        e -= (d - b + 1)
    
if e <= 0:
    e = 0

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

print(ans)
0