#t409. 货币系统
货币系统
Currency System
Problem Description
You are given a currency system with denominations. Compute the number of ways to make up an amount of face value using these denominations.
Input Format
The first line contains two integers and .
The following lines each contain one integer, the face value of one denomination.
Output Format
Output a single integer: the number of ways to compose currency of face value .
Sample Input
3 10
1
2
5
Sample Output
10
Constraints
, . Time limit 1s, memory limit 1024KiB for each test case.