#P13541. [OOI 2022] Good arrays

[OOI 2022] Good arrays

题目描述

Recently Vasya learned about integer division. Inspired by this sacred knowledge, he decided to learn more about arrays of positive integers which satisfy some divisibility conditions. More precisely, Vasya calls an array a={a1,a2,,an}a=\{a_1,a_2,\ldots,a_n\} good\textit{good} iff for every ii from 11 to n1n-1, aia_i is divisible by ai+1a_{i+1}. Please help him count the number of good arrays of length nn consisting of integer numbers not greater than cc.

输入格式

The only input line contains two integers nn and cc (1n,c51071 \le n, c \le 5 \cdot 10^7) --- the length of the array and the maximum allowed value.

输出格式

Output a single integer --- the total number of good arrays of length nn consisting of positive integers not greater than cc. As this number might be quite large, please output its remainder modulo 998244353998\,244\,353.

3 3
7
2 6
14

提示

The testset for this problem consists of 7 test groups. You get points for a group only if your solution passes all tests from this group and from all the required groups.

Offline-evaluation\textbf{Offline-evaluation} means that you will not get immediate feedback for this group and you will be able to see the outcome only after the end of the competition.

Group Points Additional constraints < Required groups Comment
nn cc
0 00 -- Sample test cases.
1 1515 n10n \le 10 c10c \le 10 00
2 1414 n1000n \le 1000 c1000c \le 1000 0,10, 1
3 1212 n5000n \le 5000 c5000c \le 5000 00--22
4 1616 n100000n \le 100\,000 c100000c \le 100\,000 00--33
5 1414 n106n \le 10^6 c106c \le 10^6 00--44
6 1515 n107n \le 10^7 c107c \le 10^7 00--55
7 1414 -- 00--66 Offline-evaluation.