#d2669. 完美数
完美数
Perfect Number
Problem Description
For given digits , when every decimal digit of an integer is either or , we call a "good number".
For a good number , when the sum of all its decimal digits is also a "good number", we call a "perfect number".
Find how many -digit numbers are "perfect numbers".
Input Format
A single line containing three integers (, ).
Output Format
Output one integer: the number of perfect numbers. Since the answer may be very large, output it modulo .
Sample Input
5 1 5
Sample Output
1
Sample Explanation
Only satisfies the requirement.