結果

問題 No.1539 不可欠な部分
ユーザー maguroflymagurofly
提出日時 2021-06-06 20:02:51
言語 Crystal
(1.11.2)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 11,662 ms
コンパイル使用メモリ 296,484 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-02 20:59:32
合計ジャッジ時間 30,780 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 225 ms
5,376 KB
testcase_02 AC 268 ms
5,376 KB
testcase_03 AC 123 ms
5,376 KB
testcase_04 AC 100 ms
5,376 KB
testcase_05 AC 78 ms
5,376 KB
testcase_06 AC 136 ms
5,376 KB
testcase_07 AC 34 ms
5,376 KB
testcase_08 AC 75 ms
5,376 KB
testcase_09 AC 230 ms
5,376 KB
testcase_10 AC 229 ms
5,376 KB
testcase_11 AC 264 ms
5,376 KB
testcase_12 AC 272 ms
5,376 KB
testcase_13 AC 294 ms
5,376 KB
testcase_14 AC 290 ms
5,376 KB
testcase_15 AC 271 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 274 ms
5,376 KB
testcase_19 AC 290 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

E = Math::E

def f(x, n)
  n = n.to_f
  E * x - E * (x**3 / n**2) / 6 + E * (x**5 / n**4) + 31 * E * (x**7 / n**6) / 5040
end

T = gets.to_s.to_i
a = 1/(Math::E * Math::PI**2)
T.times do
  n = gets.to_s.to_i
  puts f(a, n) - f(0, n)
end
0