## powerset by recursion (a real example)

23/08/2016here, you are given “N” number of digits, and you were to calculate if you can add up a certain number with combinations of those given numbers.

here is the input example –

1 2 3 4 5 6 7 |
3 110 10 6 9 13 14 20 21 22 30 49 55 101 10 10 20 30 40 50 60 70 80 90 100 280 20 3 4 1 45 46 2 4 1 65 4 23 52 35 16 74 54 17 73 5 95 |

The total number of test cases are 3. Followed by the TC number, two numeric numbers are given – the expected add-up number, and the total number of digits.

If you are able to reach the expected add-up number with given numbers, then print the total cases, otherwise you could print “0” if you cannot make up that number.