Game of Nim with removal of one stone allowed | Return true if player A wins , return false if player B wins . ; Checking the last bit of N . ; Driver Code
< ? php function findWinner ( $ N ) { return $ N & 1 ; } $ N = 15 ; if ( findWinner ( $ N ) ) echo " Player ▁ A " ; else echo " Player ▁ B " ; ? >