結果

問題 No.2352 Sharpened Knife in Fall
ユーザー 👑 timitimi
提出日時 2023-06-16 21:58:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 362 ms / 3,000 ms
コード長 373 bytes
コンパイル時間 1,608 ms
コンパイル使用メモリ 86,628 KB
実行使用メモリ 81,820 KB
最終ジャッジ日時 2023-09-06 19:42:29
合計ジャッジ時間 13,606 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,832 KB
testcase_01 AC 70 ms
71,828 KB
testcase_02 AC 70 ms
71,496 KB
testcase_03 AC 69 ms
71,324 KB
testcase_04 AC 362 ms
81,820 KB
testcase_05 AC 69 ms
71,608 KB
testcase_06 AC 352 ms
81,644 KB
testcase_07 AC 221 ms
80,196 KB
testcase_08 AC 353 ms
81,776 KB
testcase_09 AC 355 ms
81,692 KB
testcase_10 AC 354 ms
81,804 KB
testcase_11 AC 355 ms
81,620 KB
testcase_12 AC 356 ms
81,816 KB
testcase_13 AC 356 ms
81,640 KB
testcase_14 AC 214 ms
80,332 KB
testcase_15 AC 344 ms
81,580 KB
testcase_16 AC 100 ms
77,116 KB
testcase_17 AC 95 ms
77,324 KB
testcase_18 AC 183 ms
79,884 KB
testcase_19 AC 295 ms
80,804 KB
testcase_20 AC 169 ms
79,236 KB
testcase_21 AC 166 ms
79,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R,K=map(int, input().split())
ans=[]
import math
S=R*R*math.pi
S/=2
s=0
def f(x):
  c=math.pi/2-(x+math.sin(2*x)/2)
  return (R*R/2)*c 

ans=[]
for i in range(K):
  ok=math.pi/2 
  ng=-math.pi/2  
  s+=S/(K+1)
  for _ in range(40):
    mid=(ok+ng)/2
    if f(mid)<s:
      ok=mid 
    else:
      ng=mid
  ans.append(R*math.sin(ok))
ans=sorted(ans)
for i in ans:
  print(i)
0