結果

問題 No.172 UFOを捕まえろ
ユーザー pekempeypekempey
提出日時 2015-10-11 20:06:17
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 99 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 876 ms
コンパイル使用メモリ 76,672 KB
実行使用メモリ 76,032 KB
最終ジャッジ日時 2024-04-23 14:22:10
合計ジャッジ時間 4,246 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
75,648 KB
testcase_01 AC 79 ms
75,520 KB
testcase_02 AC 91 ms
75,776 KB
testcase_03 AC 84 ms
75,372 KB
testcase_04 AC 91 ms
75,776 KB
testcase_05 AC 89 ms
75,392 KB
testcase_06 AC 81 ms
76,032 KB
testcase_07 AC 92 ms
75,392 KB
testcase_08 AC 81 ms
75,776 KB
testcase_09 AC 89 ms
75,392 KB
testcase_10 AC 84 ms
76,032 KB
testcase_11 AC 93 ms
75,904 KB
testcase_12 AC 80 ms
75,392 KB
testcase_13 AC 89 ms
75,648 KB
testcase_14 AC 89 ms
75,392 KB
testcase_15 AC 93 ms
75,776 KB
testcase_16 AC 91 ms
75,520 KB
testcase_17 AC 92 ms
75,904 KB
testcase_18 AC 80 ms
75,776 KB
testcase_19 AC 99 ms
75,520 KB
testcase_20 AC 81 ms
75,520 KB
testcase_21 AC 92 ms
75,776 KB
testcase_22 AC 83 ms
75,392 KB
testcase_23 AC 93 ms
75,392 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