結果
問題 |
No.2352 Sharpened Knife in Fall
|
ユーザー |
![]() |
提出日時 | 2023-06-24 17:34:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 729 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 82,544 KB |
実行使用メモリ | 82,128 KB |
最終ジャッジ日時 | 2024-07-01 20:32:59 |
合計ジャッジ時間 | 4,559 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 17 |
ソースコード
# 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) 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)