1032. Find a Multiple
Time limit: 1.0 second
Memory limit: 64 MB
Memory limit: 64 MB
The input contains
N positive integers (
N ≤ 10000). Each of that numbers is not greater than 15000. This numbers are not necessarily different (so it may happen that two or more of them will be equal). Your task is to choose a few of given numbers (1 ≤ few ≤
N) so that the sum of chosen numbers is multiple for
N (i.e.
N *
k = (sum of chosen numbers) for some integer
k).
Input
The first line of the input contains the single number
N. Each of next
N lines contains one number from the given set.