3 1 1 2 3
665496245
After the operation, the score will be as follows.
* When choosing Box $1$ in the operation, $2\times 2\times 3=12$.
* When choosing Box $2$ in the operation, $1\times 3\times 3=9$.
* When choosing Box $3$ in the operation, $1\times 2\times 4=8$.
Therefore, the expected value in question is $\frac{1}{3}(12+9+8)=\frac{29}{3}$. This value modulo $998244353$ is $665496245$.2 2 1 2
499122182
After the operations, the score will be as follows.
* When choosing Box $1$ in the first operation and Box $1$ in the second, $3\times 2=6$.
* When choosing Box $1$ in the first operation and Box $2$ in the second, $2\times 3=6$.
* When choosing Box $2$ in the first operation and Box $1$ in the second, $2\times 3=6$.
* When choosing Box $2$ in the first operation and Box $2$ in the second, $1\times 4=4$.
Therefore, the expected value in question is $\frac{1}{4}(6+6+6+4)=\frac{11}{2}$.10 1000000000 998244350 998244351 998244352 998244353 998244354 998244355 998244356 998244357 998244358 998244359
138512322
{
"problem": {
"name": "Balls in Boxes",
"description": {
"content": "We have $N$ boxes numbered $1$ to $N$. Initially, Box $i$ contains $A_i$ balls. You will repeat the following operation $K$ times. * Choose one box out of the $N$ uniformly at random (each time ind",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc231_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have $N$ boxes numbered $1$ to $N$. Initially, Box $i$ contains $A_i$ balls.\nYou will repeat the following operation $K$ times.\n\n* Choose one box out of the $N$ uniformly at random (each time ind...",
"is_translate": false,
"language": "English"
}
]
}