CF1327E.Count The Blocks

普及+/提高

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

You wrote down all integers from 00 to 10n−110^n - 1, padding them with leading zeroes so their lengths are exactly nn. For example, if n=3n = 3 then you wrote out 000, 001, ..., 998, 999.

A block in an integer xx is a consecutive segment of equal digits that cannot be extended to the left or to the right.

For example, in the integer 0002773400000027734000 there are three blocks of length 11, one block of length 22 and two blocks of length 33.

For all integers ii from 11 to nn count the number of blocks of length ii among the written down integers.

Since these integers may be too large, print them modulo 998244353998244353.

你写下了从 00 到 10n−110^n - 1 的所有整数,并用前导零将其补足至恰好 nn 位。例如,若 n=3n = 3,则你写出的是 000、001、……、998、999。

一个整数 xx 中的**块(block)**是指一段连续的、数字全部相等的子串,且该子串无法向左或向右延伸(即左右相邻位置的数字与该块中数字不同)。

例如,在整数 0002773400000027734000 中,有三个长度为 11 的块、一个长度为 22 的块以及两个长度为 33 的块。

对每个从 11 到 nn 的整数 ii,统计所写出的所有整数中长度恰好为 ii 的块的总数。

由于结果可能过大,请对 998244353998244353 取模后输出。

输入格式

The only line contains one integer nn (1≤n≤2⋅1051 \le n \le 2 \cdot 10^5).

唯一的一行包含一个整数 nn(1≤n≤2⋅1051 \le n \le 2 \cdot 10^5)。

输出格式

In the only line print nn integers. The ii-th integer is equal to the number of blocks of length ii.

Since these integers may be too large, print them modulo 998244353998244353.

在唯一的一行中输出 nn 个整数。其中第 ii 个整数等于长度为 ii 的块的数量。

由于这些整数可能过大,请对 998244353998244353 取模后输出。

输入输出样例

  • 输入#1

    1

    输出#1

    10
  • 输入#2

    2

    输出#2

    180 10

输入解题思路,AI测评打分。不知道怎么写?

首页