The toy shop accepts an unlimited supply of each coin denomination. Count distinct combinations for the price; ordering coins differently is not a new combination. Task: Count combinations to make A using unlimited coins, modulo 1,000,000,007. Input format: n A; then n distinct positive coin values. Output format: Print combination count modulo 1,000,000,007. Constraints: 1 <= n <= 100; 0 <= A <= 100000; 1 <= coin <= 100000
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 100; 0 <= A <= 100000; 1 <= coin <= 100000
Tags:
