LearnPy Hub
← Arena
AdvancedRating 1500

Ordered Ways to Make a Total

Count the ordered sequences of the given numbers (each may be used any number of times) that add up to t. Different orders count separately. Print the count modulo 1 000 000 007.

Input

n and t (≤ 10⁴); then n distinct positive integers.

Output

One integer.

Sample 1

Input
3 4
1 2 3
Output
7

Sample 2

Input
1 3
9
Output
0
solution.py
Output appears here
Ordered Ways to Make a Total · Python Arena problem · LearnPy Hub