#Scala, 44 bytes#
1.to(n(0)-1).filter(i=>n.exists(i%_==0)).sum
n is a List which contains of a first argument N
, the rest are elements of A
Works by filtering out numbers where there doesn't exist at least one A of which i is a multiple, then summing. Strictly speaking we should use n.tail.exists
inside the closure, but as i is always less than N and therefore never a multiple of N the solution is still complete without this.