Simple solution


  • -1
    A
    class Solution {
    public:
        bool canWinNim(int n) {
          
            
            if (n % 4 == 0)
                return false;
            else
                return true;
        }
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.