結果

問題 No.131 マンハッタン距離
ユーザー Libra_A
提出日時 2020-09-15 10:29:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-22 01:36:49
合計ジャッジ時間 1,394 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, d = map(int, input().split())
if d > x + y:
    print(0)
elif d <= x and d <= y:
    print(d+1)
else:
    if d > x and d > y:
        tmp = max(x, y)
    else:
        tmp = min(x, y)

    print(d-tmp+1)
0