Hackwithinfy Round 1 question

Given an array of size N contains A[i] 0<=i<N, and given a value X we need to calculate the total number of ways to reach X by doing the sum of any elements of the array any number of times.
I tried to do this by using dp concept of the coin change problem but I think that will not work due to the constraints is there any other optimized solution?

Can you give the link to the question.

It was a hiring round they do not provide questions for practice this is all that I can remember.