結果

問題 No.172 UFOを捕まえろ
ユーザー s_shoheis_shohei
提出日時 2020-04-17 21:51:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 53,620 KB
最終ジャッジ日時 2024-04-14 13:30:53
合計ジャッジ時間 2,431 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,648 KB
testcase_01 AC 40 ms
52,880 KB
testcase_02 AC 36 ms
52,444 KB
testcase_03 AC 37 ms
53,372 KB
testcase_04 AC 37 ms
52,188 KB
testcase_05 AC 37 ms
52,772 KB
testcase_06 AC 39 ms
52,196 KB
testcase_07 AC 37 ms
53,620 KB
testcase_08 AC 36 ms
53,292 KB
testcase_09 AC 36 ms
52,616 KB
testcase_10 AC 36 ms
52,492 KB
testcase_11 AC 37 ms
52,948 KB
testcase_12 AC 37 ms
52,560 KB
testcase_13 AC 36 ms
53,560 KB
testcase_14 AC 36 ms
52,088 KB
testcase_15 AC 36 ms
52,648 KB
testcase_16 AC 38 ms
52,344 KB
testcase_17 AC 37 ms
52,692 KB
testcase_18 AC 37 ms
52,416 KB
testcase_19 AC 37 ms
52,280 KB
testcase_20 AC 38 ms
52,280 KB
testcase_21 AC 37 ms
52,980 KB
testcase_22 AC 37 ms
52,688 KB
testcase_23 AC 37 ms
52,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p,q,r = map(int, input().split())
p=abs(p)
q=abs(q)
for ans in range(p+q,10000):
    x=(ans-q+p)/2
    y=ans-x
    dist =  (p-x)**2 + (q-y)**2
    if r*r < dist:
        print(ans)
        break
0