結果

問題 No.131 マンハッタン距離
ユーザー togatoga
提出日時 2015-09-13 09:49:16
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 174 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-19 06:20:33
合計ジャッジ時間 1,782 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y,d = map(int, input().split())
if (d > x):
    res = (d - x)
    if (res > y):
        print (0)
    else:
        print (y - res + 1)
else:
    print (min(y + 1, d + 1))
0