I just want to provide my understanding to this solution:
We compute the sum for 0 to i. And we know that a sum of subarray is a sum of 0~i subtract a sum of 0~j.
If we know the remainder(sum % k) of this two sum, that mains these two sums are n * k + remainder, and we remove the n * k part from these two sum because we don't care what is the n. If these two sum have same remainder, we can Eliminate the remainder, and the sum of subarray should be some n * k.
@Fantas-LeoTao I think you're right. It should return False instead of True for the input [0,5,7] k=7.
This soultion forgot to check the condition continuous subarray of size at least 2, and the online judge doesn't have cases to check it either.
But the idea of this solution is still very smart :-)