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