結果
問題 |
No.1118 sin(x)/xの二乗和
|
ユーザー |
![]() |
提出日時 | 2020-08-18 20:58:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 238 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-10-12 03:13:18 |
合計ジャッジ時間 | 1,643 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 20 |
ソースコード
import math t=2.07079632677096370230 sin1=math.sin(1) cos1=math.cos(1) n=int(input()) if n==0: print(t) else: t-=1 r=sin1 for i in range(n-1): print(r) t-=r r=(i+1)/(i+2)*(cos1*r+sin1*(1/(i+1)**2-r**2)**0.5) print(t)