somesum - bradendubois/competitive-programming GitHub Wiki
Some Sum
ID: somesum
Difficulty: 1.9
CPU Time: 1 second
Memory: 1024 MB
Solution
One can quickly figure out the answer to each of the 10 different inputs, by knowing that any odd amount can be "Either" (an odd/even/odd = even, but even/odd/even = odd), and then figuring out that n = 4/8 must be "Even", and the rest being "Odd", and simply checking whether it is an odd N, 4 or 8, or anything else.