{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"# Tung đồng xu\n\nCho $$$n$$$ đồng xu không cân bằng. Tỷ lệ tung ra mặt ngửa của đồng xu thứ $$$i$$$ là $$$p_i\\%$$$. Ta lần lượt tung từng đồng từ đồng xu có chỉ số $$$1$$$:\n\n- Nếu tung ra mặt ngửa, ta chuyển sang tung đồng xu thứ $$$i + 1$$$. Trong trường hợp $$$i \u003d n$$$, ta không tung nữa.\n- Nếu tung ra mặt sấp, ta quay về đồng xu có chỉ số $$$1$$$.\n\nTính số lần tung đồng xu kỳ vọng trước khi ta tung được ra mặt ngửa ở đồng xu thứ $$$n$$$.\n\nTa có thể chứng minh kết quả có thể biểu diễn thành phân số $$$\\frac{p}{q}$$$. In ra kết quả $$$p * q^{-1} \\mod 998244353$$$.\n\nĐọc về: [Lý thuyết Giá trị kỳ vọng](https://vi.wikipedia.org/wiki/Gi%C3%A1_tr%E1%BB%8B_k%E1%BB%B3_v%E1%BB%8Dng)."}},{"title":"Input","value":{"format":"MD","content":"Dòng đầu chứa $$$n$$$ ($$$1 \\le n \\le 200000$$$) - số đồng xu bạn có.\n\nDòng thứ hai chứa $$$n$$$ số nguyên: $$$p_1, p_2, \\dots, p_n$$$ ($$$1 \\le p_i \\le 100$$$)."}},{"title":"Output","value":{"format":"MD","content":"In ra kết quả modulo $$$998244353$$$."}},{"title":"Examples","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\n50\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n10 20 50\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e112\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}