twostones - bradendubois/competitive-programming GitHub Wiki

Take Two Stones

ID: twostones

Difficulty: 1.3

CPU Time: 1 second

Memory: 1024 MB

Solution

Just looking at the sample data, it appears that any odd N results in a win for Alice, and any even N results in a win for Bob. Modulo division (N % 2) can tell whether the number is even or not.