2 2 1 1
3
The series of operations may proceed as follows:
* You draw a card with $1$ written on it. The notebook now has one $1$ written in it.
* You again draw a card with $1$ written on it. The notebook now has two $1$s written in it.
* You draw a card with $2$ written on it. The notebook now has two $1$s and one $2$ written in it.
The sought expected value is $2\times\frac{1}{2}+3\times\frac{1}{4}+4\times\frac{1}{8}+\ldots=3$.5 2 4 1
748683270
The expected value is $\frac{21}{4}$, whose representation modulo $998244353$ is $748683270$.50 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
244742906
The expected value is $\frac{13943237577224054960759}{61980890084919934128}$.74070 15 1 2 3 11 22 33 111 222 333 1111 2222 3333 11111 22222 33333
918012973
{
"problem": {
"name": "Collect Them All",
"description": {
"content": "There are $N$ cards in a box. Each card has an integer written on it, which is between $1$ and $M$, inclusive. For each $i=1,\\ldots,M$, there are $C_i$ cards with the number $i$ written on them. Start",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc331_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ cards in a box. Each card has an integer written on it, which is between $1$ and $M$, inclusive. For each $i=1,\\ldots,M$, there are $C_i$ cards with the number $i$ written on them.\nStart...",
"is_translate": false,
"language": "English"
}
]
}