結果

問題 No.2352 Sharpened Knife in Fall
ユーザー flygonflygon
提出日時 2023-06-16 21:48:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 537 bytes
コンパイル時間 878 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 103,560 KB
最終ジャッジ日時 2023-09-06 19:19:38
合計ジャッジ時間 18,783 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,800 KB
testcase_01 AC 71 ms
71,668 KB
testcase_02 AC 72 ms
71,916 KB
testcase_03 AC 72 ms
71,736 KB
testcase_04 AC 898 ms
102,220 KB
testcase_05 AC 72 ms
71,628 KB
testcase_06 AC 866 ms
102,036 KB
testcase_07 AC 482 ms
89,576 KB
testcase_08 AC 872 ms
102,036 KB
testcase_09 AC 889 ms
103,560 KB
testcase_10 AC 872 ms
101,904 KB
testcase_11 AC 867 ms
101,836 KB
testcase_12 AC 877 ms
101,980 KB
testcase_13 AC 871 ms
102,012 KB
testcase_14 AC 443 ms
87,660 KB
testcase_15 AC 823 ms
102,960 KB
testcase_16 AC 130 ms
77,972 KB
testcase_17 AC 111 ms
78,532 KB
testcase_18 AC 379 ms
85,656 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = [R]
for i in range((K+1)//2):
    now = (i+1)*S/(K+1)
    l = 0
    r = ans[-1]
    for _ in range(100):
        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)
new = set()
for i in range(1, len(ans)):
    new.add(ans[i])
    new.add(-ans[i])
print(*sorted(list(new)), sep = "\n")
0