結果

問題 No.2352 Sharpened Knife in Fall
ユーザー flygonflygon
提出日時 2023-06-16 21:44:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 547 bytes
コンパイル時間 1,082 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 101,716 KB
最終ジャッジ日時 2023-09-06 19:09:10
合計ジャッジ時間 14,179 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,732 KB
testcase_01 AC 69 ms
71,480 KB
testcase_02 AC 69 ms
71,548 KB
testcase_03 AC 70 ms
71,812 KB
testcase_04 AC 393 ms
101,000 KB
testcase_05 AC 71 ms
71,628 KB
testcase_06 AC 506 ms
100,284 KB
testcase_07 AC 292 ms
88,536 KB
testcase_08 AC 518 ms
98,904 KB
testcase_09 WA -
testcase_10 AC 501 ms
97,868 KB
testcase_11 AC 477 ms
100,660 KB
testcase_12 AC 480 ms
100,600 KB
testcase_13 AC 482 ms
100,768 KB
testcase_14 AC 265 ms
88,628 KB
testcase_15 AC 443 ms
101,716 KB
testcase_16 AC 113 ms
78,508 KB
testcase_17 AC 99 ms
77,384 KB
testcase_18 AC 229 ms
85,184 KB
testcase_19 WA -
testcase_20 AC 207 ms
83,044 KB
testcase_21 AC 211 ms
82,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import acos, degrees
pi = 3.14159265358979
R,K = map(int,input().split())
S = pi*R*R

ans = [R]
now = S/(K+1)
for i in range((K+1)//2):
    l = 0
    r = ans[-1]
    while (r-l) > 10**-7:
        y = (r+l)/2
        xx = R*R - y*y
        th = degrees(acos((-xx+y*y)/(R*R)))
        s = S*th/360 - (xx**0.5)*y
        if s <= now:
            r = y
        else:
            l = y
    ans.append(l)
    now += S/(K+1)
new = set()
for i in range(1, len(ans)):
    new.add(ans[i])
    new.add(-ans[i])
print(*sorted(list(new)), sep = "\n")
0