結果

問題 No.131 マンハッタン距離
ユーザー ktshunktshun
提出日時 2015-05-29 15:53:56
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 6,732 KB
実行使用メモリ 6,192 KB
最終ジャッジ日時 2023-09-20 15:42:49
合計ジャッジ時間 1,846 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,184 KB
testcase_01 AC 12 ms
5,912 KB
testcase_02 AC 11 ms
5,980 KB
testcase_03 AC 11 ms
5,900 KB
testcase_04 AC 11 ms
5,980 KB
testcase_05 AC 11 ms
6,052 KB
testcase_06 AC 12 ms
6,088 KB
testcase_07 WA -
testcase_08 AC 11 ms
6,036 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 11 ms
5,904 KB
testcase_13 AC 12 ms
6,040 KB
testcase_14 AC 11 ms
5,908 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 11 ms
5,908 KB
testcase_18 AC 12 ms
5,900 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 11 ms
6,040 KB
testcase_24 AC 12 ms
6,048 KB
testcase_25 WA -
testcase_26 AC 11 ms
6,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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