結果

問題 No.131 マンハッタン距離
ユーザー Watson
提出日時 2017-08-21 15:32:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-15 00:50:45
合計ジャッジ時間 1,881 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y,d = [int(i) for i in input().split()]
if d > x+y:
    print(0)
elif d == 0:
    print(1)
elif d > x or d > y:
    if x > y:
        print(x)
    else:
        print(y)
else:
    if x > y:
        print(x+1)
    else:
        print(y+1)
0