https://leetcode.com/problems/nim-game/

Source


    bool canWinNim(int n) {
        return n%4 == 0 ? false : true;
    }

GitHub

NimGame