#P10986. [蓝桥杯 2023 国 Python A] 2023

    ID: 12389 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 难度: 7 上传者: 标签>2023组合数学容斥原理蓝桥杯国赛

[蓝桥杯 2023 国 Python A] 2023

Background

It is recommended to use PyPy3 to submit this problem.

Problem Description

Given nn and mm, find how many nn-digit decimal integers contain exactly mm occurrences of 20232023.

For example, 0020231202300202312023 is an 1111-digit decimal integer that contains 22 occurrences of 20232023.

Since the result may be very large, output the answer modulo 998,244,353998,244,353.

Input Format

One line contains two integers n,mn, m, separated by a space.

Output Format

One line contains one integer, representing the answer.

5 1
20

Hint

For 40%40\% of the testdata, n105,m10n \le 10^5, m \le 10.

For all testdata, 4n105,04mn4 \le n \le 10^5, 0 \le 4m \le n.

Translated by ChatGPT 5