## https://yukicoder.me/problems/no/2876 MOD = 998244353 class CombinationCalculator: """ modを考慮したPermutation, Combinationを計算するためのクラス """ def __init__(self, size, mod): self.mod = mod self.factorial = [0] * (size + 1) self.factorial[0] = 1 for i in range(1, size + 1): self.factorial[i] = (i * self.factorial[i - 1]) % self.mod self.inv_factorial = [0] * (size + 1) self.inv_factorial[size] = pow(self.factorial[size], self.mod - 2, self.mod) for i in reversed(range(size)): self.inv_factorial[i] = ((i + 1) * self.inv_factorial[i + 1]) % self.mod def calc_combination(self, n, r): if n < 0 or n < r or r < 0: return 0 if r == 0 or n == r: return 1 ans = self.inv_factorial[n - r] * self.inv_factorial[r] ans %= self.mod ans *= self.factorial[n] ans %= self.mod return ans def calc_permutation(self, n, r): if n < 0 or n < r: return 0 ans = self.inv_factorial[n - r] ans *= self.factorial[n] ans %= self.mod return ans def main(): N, x = map(int, input().split()) if x == 0: print(1) return elif x == 10: print(N) return combi = CombinationCalculator(N, MOD) dp = [0] * N dp[0] = 1 answer = 0 p = (x * pow(100, MOD - 2, MOD)) % MOD q = (1 - p) % MOD # p = x /100 # q = 1 - p for i in range(N): a_sum = 0 for j in range(i + 1, N): a = (dp[i] * combi.calc_combination(N - i - 1, j - i)) % MOD a %= MOD a *= pow(p, j - i, MOD) # a *= pow(p, j - i) a %= MOD x = N - j - 1 a *= pow(q, x, MOD) # a *= pow(q, x) a %= MOD dp[j] += a dp[j] %= MOD a_sum += a a_sum %= MOD dp[i] -= a_sum dp[i] %= MOD answer += (dp[i] * (i + 1)) % MOD answer %= MOD print(answer) if __name__ == "__main__": main()