AtCoder Regular Contest 202 (Div. 1)
翻译中…
Problem Statement
翻译中…
For a positive integer $n$, define $R_n$ as "the integer obtained by interpreting a string of $n$ consecutive $1$s as a decimal number". For example, $R_3 = 111$.
翻译中…
You are given a positive integer sequence $A = (A_1, A_2, \dots, A_N)$.
For $k = 1, 2, \dots, N$, calculate $\mathrm{LCM}(R_{A_1}, R_{A_2}, \dots, R_{A_k}) \bmod 998244353$. Here, $\mathrm{LCM}$ is the function that calculates the least common multiple.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 2 \times 10^5$$1 \leq A_i \leq 2 \times 10^5$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N
A_1 A_2 \dots A_N
翻译中…
Output
翻译中…
Output $N$ lines. The $k$-th line should contain $\mathrm{LCM}(R_{A_1}, R_{A_2}, \dots, R_{A_k}) \bmod 998244353$.
翻译中…
样例
Input #1
3
2 4 6
Output #1
11
1111
11222211
For $k=1$, $\mathrm{LCM}(11) \bmod 998244353 = 11$.
For $k=2$, $\mathrm{LCM}(11,1111) \bmod 998244353= 1111$.
For $k=3$, $\mathrm{LCM}(11,1111,111111) \bmod 998244353= 11222211$.
Input #2
1
200000
Output #2
202819780
Input #3
10
47718 21994 98917 104184 160670 190107 125377 29127 7017 177076
Output #3
429620650
844699313
355160870
608402385
858856681
605347397
566966598
429324494
370941155
567238109
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。