結果

問題 No.2352 Sharpened Knife in Fall
ユーザー flygonflygon
提出日時 2023-06-16 21:46:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 569 bytes
コンパイル時間 1,503 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 101,348 KB
最終ジャッジ日時 2023-09-06 19:13:41
合計ジャッジ時間 13,821 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,468 KB
testcase_01 AC 72 ms
71,440 KB
testcase_02 AC 74 ms
71,644 KB
testcase_03 AC 71 ms
71,612 KB
testcase_04 AC 430 ms
100,224 KB
testcase_05 AC 70 ms
71,528 KB
testcase_06 AC 533 ms
98,240 KB
testcase_07 AC 311 ms
89,060 KB
testcase_08 AC 532 ms
98,420 KB
testcase_09 WA -
testcase_10 AC 529 ms
100,652 KB
testcase_11 AC 525 ms
101,064 KB
testcase_12 AC 534 ms
101,348 KB
testcase_13 AC 525 ms
100,816 KB
testcase_14 AC 289 ms
88,400 KB
testcase_15 WA -
testcase_16 AC 113 ms
78,340 KB
testcase_17 AC 99 ms
77,180 KB
testcase_18 AC 245 ms
85,228 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import acos, degrees
pi = 3.141592653589793238462643383279502884
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**-9:
        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