結果

問題 No.2352 Sharpened Knife in Fall
ユーザー flygonflygon
提出日時 2023-06-16 23:26:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 103,672 KB
最終ジャッジ日時 2023-09-06 22:30:34
合計ジャッジ時間 18,639 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,848 KB
testcase_01 AC 70 ms
71,852 KB
testcase_02 AC 68 ms
71,980 KB
testcase_03 AC 66 ms
71,960 KB
testcase_04 AC 903 ms
102,320 KB
testcase_05 AC 66 ms
71,752 KB
testcase_06 AC 892 ms
102,268 KB
testcase_07 AC 505 ms
89,584 KB
testcase_08 AC 911 ms
102,212 KB
testcase_09 AC 899 ms
103,672 KB
testcase_10 AC 901 ms
102,536 KB
testcase_11 AC 900 ms
102,212 KB
testcase_12 AC 899 ms
102,472 KB
testcase_13 AC 897 ms
102,164 KB
testcase_14 AC 475 ms
89,176 KB
testcase_15 AC 849 ms
103,004 KB
testcase_16 AC 134 ms
78,012 KB
testcase_17 AC 112 ms
78,288 KB
testcase_18 AC 384 ms
85,760 KB
testcase_19 AC 738 ms
98,340 KB
testcase_20 WA -
testcase_21 AC 331 ms
84,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import acos, degrees, pi
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 = R
    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 - (pow(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