5 5 10 6 1 6 10 9 10 123456789 111
12 1 14 16 178 When the elements of $S$ are listed in ascending order, the beginning of the list evolves as follows. * Initially, $S=\lbrace 1,2,3,4,5,6,7,8,9,10,\ldots\rbrace$. * The first query removes multiples of $5$, resulting in $S=\lbrace1,2,3,4,6,7,8,9,11,12,\ldots\rbrace$. * The second query removes multiples of $6$, resulting in $S=\lbrace1,2,3,4,7,8,9,11,13,14,\ldots\rbrace$. * The third query removes multiples of $6$, resulting in $S=\lbrace1,2,3,4,7,8,9,11,13,14,\ldots\rbrace$. * The fourth query removes multiples of $9$, resulting in $S=\lbrace1,2,3,4,7,8,11,13,14,16,\ldots\rbrace$. * The fifth query removes multiples of $123456789$, resulting in $S=\lbrace1,2,3,4,7,8,11,13,14,16,\ldots\rbrace$.
{
"problem": {
"name": "Removal of Multiples",
"description": {
"content": "Let $S$ be the set of all positive integers. Process $Q$ queries in order. The $i$\\-th query gives you an integer $A_i$ not less than $2$ and a positive integer $B_i$, so perform the following two ste",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 4000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc197_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Let $S$ be the set of all positive integers.\nProcess $Q$ queries in order. The $i$\\-th query gives you an integer $A_i$ not less than $2$ and a positive integer $B_i$, so perform the following two ste...",
"is_translate": false,
"language": "English"
}
]
}