結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー simansiman
提出日時 2016-03-24 01:13:45
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,672 KB
最終ジャッジ日時 2024-04-09 21:15:13
合計ジャッジ時間 1,695 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
12,544 KB
testcase_01 AC 82 ms
12,544 KB
testcase_02 AC 79 ms
12,544 KB
testcase_03 AC 77 ms
12,416 KB
testcase_04 AC 77 ms
12,416 KB
testcase_05 AC 83 ms
12,544 KB
testcase_06 AC 80 ms
12,544 KB
testcase_07 AC 81 ms
12,672 KB
testcase_08 AC 82 ms
12,416 KB
testcase_09 AC 79 ms
12,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Yukicoder
  def initialize
    t, c = gets.chomp.split.map(&:to_i)
    dp = Hash.new

    dp[1] = 1.0

    a = [2,3,5,7,11,13].inject(:+) / 6.0
    b = [4,6,8,9,10,12].inject(:+) / 6.0

    puts (a**t) * (b**c)
  end
end

Yukicoder.new
0