結果

問題 No.172 UFOを捕まえろ
ユーザー pekempeypekempey
提出日時 2015-10-11 20:06:17
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 1,069 ms
コンパイル使用メモリ 77,968 KB
実行使用メモリ 76,644 KB
最終ジャッジ日時 2023-08-05 17:30:48
合計ジャッジ時間 4,276 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,316 KB
testcase_01 AC 75 ms
76,312 KB
testcase_02 AC 75 ms
76,284 KB
testcase_03 AC 74 ms
76,492 KB
testcase_04 AC 75 ms
76,600 KB
testcase_05 AC 75 ms
76,260 KB
testcase_06 AC 78 ms
76,444 KB
testcase_07 AC 76 ms
76,252 KB
testcase_08 AC 76 ms
76,472 KB
testcase_09 AC 75 ms
76,176 KB
testcase_10 AC 75 ms
76,204 KB
testcase_11 AC 74 ms
76,644 KB
testcase_12 AC 76 ms
76,468 KB
testcase_13 AC 74 ms
76,316 KB
testcase_14 AC 75 ms
76,480 KB
testcase_15 AC 76 ms
76,292 KB
testcase_16 AC 76 ms
76,452 KB
testcase_17 AC 75 ms
76,160 KB
testcase_18 AC 75 ms
76,088 KB
testcase_19 AC 76 ms
76,284 KB
testcase_20 AC 75 ms
76,332 KB
testcase_21 AC 77 ms
76,384 KB
testcase_22 AC 77 ms
76,316 KB
testcase_23 AC 74 ms
76,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, r = map(int, raw_input().split())
x, y = abs(x), abs(y)

low, high = 0, 10 ** 9
while high - low > 1:
	mid = (low + high) / 2
	if (x + y - mid) ** 2 > 2 * r ** 2 and x + y < mid:
		high = mid
	else:
		low = mid

print high
0