```
public class Solution {
public int CombinationSum4(int[] nums, int target) {
//DP
int[] DP=new int[target+1];
DP[0]=1;
for(int i=1;i<=target;i++)
{
for(int j=0;j<nums.Length;j++)
{
if(i-nums[j]>=0)
DP[i] += DP[i-nums[j]];
}
}
return DP[target];
}
}
```