結果

問題 No.1466 I am not genius.
ユーザー maguroflymagurofly
提出日時 2021-04-02 23:19:07
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 522 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 15,712 KB
最終ジャッジ日時 2023-08-25 13:46:30
合計ジャッジ時間 3,664 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 79 ms
15,672 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x = gets.to_f

a = -1
b = 2**2
c = 1123
d = 21460
g = 2
h = 99
i = 1103
j = 26390
k = 1
l = 882

def nPk(n, k)
  fact(n) / fact(n - k)
end

def fact(n)
  Math.gamma(n + 1)
end

N = 20
N1 = N
N2 = N

seq1 = (0..N1).sum { |n|
  (a**n * fact(b) * nPk(b * n, [0, b * n - d.gcd(l)**2].max) * (c + d * n)) / (l**(n + k) * (49 * b * h / 22.0)**n * ((2**2)**n * fact(n))**b)
}

seq2 = (Math.sqrt(g**3 / h.to_f**g**g) * (0..N2).sum { |n|
  (fact(b * n) * (i + j * n)) / ((22.0 * l / 49)**n * fact(n))**b
})

puts x * seq1 * seq2**a
0