結果
問題 | No.2352 Sharpened Knife in Fall |
ユーザー |
![]() |
提出日時 | 2023-06-24 17:39:29 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 711 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 82,856 KB |
実行使用メモリ | 81,152 KB |
最終ジャッジ日時 | 2024-07-01 20:38:05 |
合計ジャッジ時間 | 9,819 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 6 |
ソースコード
# 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)