結果
問題 | No.1466 I am not genius. |
ユーザー |
|
提出日時 | 2021-04-02 22:21:03 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 104 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-23 19:54:18 |
合計ジャッジ時間 | 3,343 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
コンパイルメッセージ
Syntax OK
ソースコード
def fac(n) [*1..n].reduce(1,:*) end N=10 X=(0...N).sum{|n|(-1)**n*(1123+21460*n)*fac(4*n)/(882**(2*n+1)*(4**n*fac(n))**4).to_f} Y=Math.sqrt(8)/99**2*(0...N).sum{|n|fac(4*n)*(1103+26390*n)/((396**n*fac(n))**4).to_f} printf "%.16f\n",gets.to_f*X/Y