結果
問題 | No.2352 Sharpened Knife in Fall |
ユーザー | komkompi |
提出日時 | 2023-06-24 17:44:35 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 345 ms / 3,000 ms |
コード長 | 713 bytes |
コンパイル時間 | 645 ms |
コンパイル使用メモリ | 87,720 KB |
実行使用メモリ | 82,472 KB |
最終ジャッジ日時 | 2023-09-14 13:19:33 |
合計ジャッジ時間 | 12,430 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
71,696 KB |
testcase_01 | AC | 70 ms
71,872 KB |
testcase_02 | AC | 69 ms
71,828 KB |
testcase_03 | AC | 69 ms
71,848 KB |
testcase_04 | AC | 276 ms
81,196 KB |
testcase_05 | AC | 72 ms
71,768 KB |
testcase_06 | AC | 336 ms
81,392 KB |
testcase_07 | AC | 214 ms
79,288 KB |
testcase_08 | AC | 344 ms
81,512 KB |
testcase_09 | AC | 345 ms
82,472 KB |
testcase_10 | AC | 341 ms
81,252 KB |
testcase_11 | AC | 340 ms
80,876 KB |
testcase_12 | AC | 340 ms
81,000 KB |
testcase_13 | AC | 338 ms
80,676 KB |
testcase_14 | AC | 206 ms
79,188 KB |
testcase_15 | AC | 329 ms
82,368 KB |
testcase_16 | AC | 106 ms
77,256 KB |
testcase_17 | AC | 100 ms
77,236 KB |
testcase_18 | AC | 183 ms
78,504 KB |
testcase_19 | AC | 287 ms
81,148 KB |
testcase_20 | AC | 172 ms
78,508 KB |
testcase_21 | AC | 169 ms
78,300 KB |
ソースコード
# 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**-8: middle=(high+low)/2 temp_s=integrate(middle)-used if temp_s<s: high=middle else: low=middle ans.append(middle) 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)