結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,744 KB
testcase_01 AC 66 ms
71,508 KB
testcase_02 AC 67 ms
71,744 KB
testcase_03 AC 66 ms
71,888 KB
testcase_04 AC 1,528 ms
102,708 KB
testcase_05 AC 66 ms
71,860 KB
testcase_06 AC 1,527 ms
102,616 KB
testcase_07 AC 813 ms
89,784 KB
testcase_08 AC 1,527 ms
102,616 KB
testcase_09 AC 1,526 ms
104,444 KB
testcase_10 AC 1,520 ms
102,824 KB
testcase_11 AC 1,523 ms
102,760 KB
testcase_12 AC 1,524 ms
102,572 KB
testcase_13 AC 1,532 ms
102,580 KB
testcase_14 AC 770 ms
89,660 KB
testcase_15 AC 1,444 ms
104,084 KB
testcase_16 AC 164 ms
78,396 KB
testcase_17 AC 124 ms
78,036 KB
testcase_18 AC 626 ms
85,948 KB
testcase_19 AC 1,222 ms
98,804 KB
testcase_20 WA -
testcase_21 AC 512 ms
84,888 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(200):
        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