結果

問題 No.2352 Sharpened Knife in Fall
ユーザー H20
提出日時 2023-06-16 22:28:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 83,672 KB
最終ジャッジ日時 2024-06-24 15:04:28
合計ジャッジ時間 5,912 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 1 WA * 1 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

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