Make m pigeons
a1
a1+a2
a1+a2+a3
.
.
.
.
a1+a2+a3+..........+am
Now, if m divides any of the above m numbers (pigeons) then we got our k and s such that
ak+1 + ak+2 + ....... + as is divisible by m.
Now if none of the above m numbers (pigeons) is divisible by m then the remainders left by them after dividing by m will belong to the set {1,2,.....,m-1}
Consider the numbers 1,2,.....,m-1 as holes.
Now, we are putting a pigeon (a1 + a2 + .... +ak) in the hole r if the number (a1 + a2 + ... + ak) leaves remainder r when divided by m
Since there are m pigeons and (m-1) holes so by pigeonhole principle there exist at least one hole which contain more than one pigeon.
That means there exists at least two numbers among the above m numbers which will leave the same remainder when divided by m
Let these two numbers be (a1 + a2 + a3 + .... + ak) and (a1 + a2 + ....+ as) where k<s
So, the number (a1 + a2 + .... + as) - (a1 + a2 + ... +ak) = ak+1 + ak+2 + .... + as is divisible by m.
So, given m integers a1,a2,....,am we will always get two integers k,s with 0≤k<s≤m such that
ak+1+ak+2+.....+as is divisible by m. (Proved)