結果

問題 No.2352 Sharpened Knife in Fall
ユーザー minimumminimum
提出日時 2023-06-16 21:35:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 327 ms / 3,000 ms
コード長 413 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 86,756 KB
実行使用メモリ 78,848 KB
最終ジャッジ日時 2023-09-06 18:54:31
合計ジャッジ時間 12,334 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,564 KB
testcase_01 AC 72 ms
71,192 KB
testcase_02 AC 70 ms
71,820 KB
testcase_03 AC 72 ms
70,960 KB
testcase_04 AC 274 ms
78,308 KB
testcase_05 AC 72 ms
71,116 KB
testcase_06 AC 319 ms
78,660 KB
testcase_07 AC 202 ms
78,308 KB
testcase_08 AC 327 ms
78,812 KB
testcase_09 AC 321 ms
78,668 KB
testcase_10 AC 301 ms
78,396 KB
testcase_11 AC 303 ms
78,624 KB
testcase_12 AC 304 ms
78,724 KB
testcase_13 AC 299 ms
78,168 KB
testcase_14 AC 193 ms
77,864 KB
testcase_15 AC 280 ms
78,848 KB
testcase_16 AC 116 ms
78,000 KB
testcase_17 AC 105 ms
76,880 KB
testcase_18 AC 173 ms
77,832 KB
testcase_19 AC 276 ms
78,204 KB
testcase_20 AC 167 ms
77,568 KB
testcase_21 AC 166 ms
77,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math


R, K = map(int, input().split())
ans = [0.0] * K
for i in range(K // 2):
    lo = 0
    hi = R
    while hi - lo > 1e-6:
        x = (hi + lo) / 2
        t = math.acos(x / R)
        s = R * R * t - x * math.sqrt(R * R - x * x)
        if s >= ((i + 1) / (K + 1)) * R * R * math.pi:
            lo = x
        else:
            hi = x
    ans[i] = -lo
    ans[-i-1] = lo

for a in ans:
    print(a)
0