{"problem":{"name":"Sequence of Multiples","description":{"content":"You are given integers $N$ and $X$. Assume that an integer sequence $A = (A_1, \\ldots, A_N)$ satisfies all of the conditions below. *   $A_1 = X$. *   For every $i$ ($1\\leq i\\leq N$), $A_i$ is a mult","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":6000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc135_e"},"statements":[{"statement_type":"Markdown","content":"You are given integers $N$ and $X$. Assume that an integer sequence $A = (A_1, \\ldots, A_N)$ satisfies all of the conditions below.\n\n*   $A_1 = X$.\n*   For every $i$ ($1\\leq i\\leq N$), $A_i$ is a multiple of $i$.\n*   $A$ is strictly increasing. In other words, $A_1 < \\cdots < A_N$ holds.\n\nFind the minimum possible value of $\\sum_{i=1}^N A_i$, modulo $998244353$.\nThere are $T$ test cases, each of which should be solved.\n\n## Constraints\n\n*   $1\\leq T\\leq 10$\n*   $1\\leq N \\leq 10^{18}$\n*   $1\\leq X \\leq 10^{18}$\n\n## Input\n\nInput is given from Standard Input from the following format:\n\n$T$\n$\\text{case}_1$\n$\\vdots$\n$\\text{case}_T$\n\nEach case is in the following format:\n\n$N$ $X$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc135_e","tags":[],"sample_group":[["5\n5 100\n1 10\n10 1\n1000000000000000000 1\n100 100","525\n10\n55\n75433847\n61074\n\nHere is a sequence $A$ that minimizes $\\sum_{i=1}^N A_i$ for each of the first three test cases.\n\n*   The first test case: $A = (100, 102, 105, 108, 110)$.\n*   The second test case: $A = (10)$.\n*   The third test case: $A = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)$."]],"created_at":"2026-03-03 11:01:14"}}