Good arrays
Time limit2sMemory limit1024 MB
Count arrays of length n with values up to c where each element is divisible by the next one, modulo 998244353.
- Level
Medium6 of 10
- Topics
- Number theory, Combinatorics, Math
- Solved
- No attempts yet
Problem
Recently Vasya learned about integer division. Inspired by this sacred knowledge, he decided to learn more about arrays of positive integers that satisfy some divisibility conditions. More precisely, Vasya calls an array good if for every from to , is divisible by . Count the number of good arrays of length consisting of integers not greater than .
Input
The only input line contains two integers and (), the length of the array and the maximum allowed value.
Output
Output a single integer, the total number of good arrays of length consisting of positive integers not greater than . Since this number might be large, output its remainder modulo .