結果

問題 No.2352 Sharpened Knife in Fall
ユーザー 👑 H20H20
提出日時 2023-06-16 22:28:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 423 ms
コンパイル使用メモリ 87,396 KB
実行使用メモリ 84,656 KB
最終ジャッジ日時 2023-09-06 20:43:50
合計ジャッジ時間 6,369 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 72 ms
71,468 KB
testcase_02 WA -
testcase_03 AC 70 ms
71,528 KB
testcase_04 WA -
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

def is_ok(h):
    theta = 2*math.acos(1-(h/R))
    S = theta/2*R**2-(R-h)*(h*(2*R-h))**0.5
    return S>=R**2*3.1415926535*(k+1)/(K+1)

def meguru_bisect(ng, ok):
    while (abs(ok - ng) > 10**(-8)):
        mid = (ok + ng) / 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok

R,K = map(int, input().split())
ANS = []
R*=1000
for k in range(K):
    ANS.append((meguru_bisect(0, 2*R)-R)/1000)
print(*ANS)
0