結果

問題 No.2352 Sharpened Knife in Fall
ユーザー komkompikomkompi
提出日時 2023-06-24 17:39:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 711 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 82,132 KB
最終ジャッジ日時 2023-09-14 13:14:13
合計ジャッジ時間 11,190 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,764 KB
testcase_01 AC 72 ms
71,792 KB
testcase_02 AC 75 ms
71,844 KB
testcase_03 AC 73 ms
71,564 KB
testcase_04 WA -
testcase_05 AC 74 ms
71,856 KB
testcase_06 AC 348 ms
81,236 KB
testcase_07 AC 217 ms
78,896 KB
testcase_08 AC 351 ms
80,260 KB
testcase_09 AC 349 ms
82,132 KB
testcase_10 WA -
testcase_11 AC 331 ms
80,864 KB
testcase_12 AC 334 ms
80,804 KB
testcase_13 WA -
testcase_14 AC 202 ms
78,936 KB
testcase_15 WA -
testcase_16 AC 109 ms
77,316 KB
testcase_17 AC 102 ms
77,388 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 170 ms
78,532 KB
testcase_21 AC 175 ms
78,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import math

R,K=map(int,input().split())

S=R**2*math.pi

s=S/(K+1)

def integrate(x):
    #x=rsintheta
    theta=math.acos(x/R)
    
    sense=R**2*theta
    three=1/2*R**2*math.sin(2*theta)
    
    area=sense-three
    return area
    

ans=[]
used=0
high=R
for i in range(K//2):
    low=0
    
    while high-low>10**-7:
        middle=(high+low)/2
        
        temp_s=integrate(middle)-used
        if temp_s<s:
            high=middle
        else:
            low=middle
        
        
    ans.append(high)
    used+=integrate(middle)-used
    
rev=[-a for a in ans]

if K%2==0:
    ans=rev+ans
else:
    ans=rev+[0]+ans

ans.sort()

for a in ans:
    print(a)

0