結果

問題 No.131 マンハッタン距離
ユーザー Konton7
提出日時 2019-05-08 16:09:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 190 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-02 00:28:14
合計ジャッジ時間 1,815 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, d = [ int(v) for v in input().split(" ") ]

c = x + y - d + 1

if x >= d and y >= d:
	print(d+1)
elif x >= d:
	print(d-y)
elif y >= d:
	print(d-x)
elif c < 0:
	print(0)
else:
	print(c)
0