If efficiency is not important, an algorithm at a high-level is:
input: array A[1..K] of positive numbers, positive N
for each subset S of { 1..K }
sum = 0
for each i in S
sum = sum + A[i]
end
if (sum equals N) return true
end
return false