atcoder#ARC116C. [ARC116C] Multiple Sequences
[ARC116C] Multiple Sequences
Score : points
Problem Statement
Given are integers and . How many sequences of integers satisfy the following conditions?
- is a multiple of .
Since the answer can be enormous, report it modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
3 4
13
Some of the sequences satisfying the conditions follow:
20 30
71166
200000 200000
835917264