MOD = 998244353i64 x, k = read_line.split.map(&.to_i) if k > 200 exit end dp0 = Array.new(k + 1) { Array.new(k + 1, 0i64) } dp1 = Array.new(k + 1) { Array.new(k + 1, 0i64) } dp0[0][0] = 1 (2 * k).times do |_| dp1.each { |r| r.fill(0i64) } 0.upto(k) do |i| 0.upto(k) do |j| if i > 0 dp1[i - 1][j] += dp0[i][j] * (100 - x) dp1[i - 1][j] %= MOD end if i < k dp1[i + 1][{j, i + 1}.max] += dp0[i][j] * x dp1[i + 1][{j, i + 1}.max] %= MOD end end end dp0, dp1 = dp1, dp0 end ans = (k + 1).times.sum { |i| dp0[0][i] * i } % MOD ans *= pow(inv(100i64), 2 * k) puts ans % MOD def inv(v : Int64) pow(v, MOD - 2) end def pow(v : Int64, p) ret = 1i64 while p > 0 if (p & 1i64) != 0 ret *= v ret %= MOD end v *= v v %= MOD p >>= 1 end ret end