- -1of 1 vote
I was asked the following: Given integers N and A. Find how many integer sequences with elements between 1 and A have sum of all elements equals to N.- merlinparrajimenez January 26, 2017 in United States
N, A <= 1000.
Sample input: 4 3 , sample output is 7.
In this moment, I realized I do not understand the question. If I have a sequence of 1,2,3, the only sub-sequence that sums 4 is 1,3. So the answer should be 1. What am I missing?
| Report Duplicate | Flag | PURGE
Open Chat in New Window