by taesko · 7y ago · 0 comments
I think a school student can do this math manually. The hardest part is the sum of the first N(in this case 10) numbers and then finding the divisor. Yes there might be a better solution.
But I think a kid would think up a brute force algorithm like this and it is easier for small N. The computation is only in O(N) complexity haha. And if an answer exists it will always be found - so it is a real solution. Might be the first algorithm you write if you are tasked to do this with software.
No comments yet.