atcoder#ABC132F. [ABC132F] Small Products
[ABC132F] Small Products
Score : points
Problem Statement
Find the number of sequences of length consisting of positive integers such that the product of any two adjacent elements is at most , modulo .
Constraints
1(fixed at 21:33 JST)- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of sequences, modulo .
3 2
5
, , , , and satisfy the condition.
10 3
147
314159265 35
457397712