結果

問題 No.131 マンハッタン距離
ユーザー ktshun
提出日時 2015-05-29 16:02:36
言語 Python2
(2.7.18)
結果
AC  
実行時間 9 ms / 5,000 ms
コード長 204 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 10:49:39
合計ジャッジ時間 955 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-
import math
if __name__ == "__main__":
	x,y,d = map(int,raw_input().split())
	if x < d and y < d and x + y  < d:
		print 0
	else:
		print int(math.fabs(min(d,y) + min(d,x) - d + 1))
0