Game

Правка en1, от gXa, 2017-06-26 21:14:14
Suppose there are two piles of plates in the table. One has ‘m’ RED plates and other has ‘n’ BLACK plates. In his/her chance, a player can either pick any number of red plates or any number black plates or equal number of red and black plates. A player loses if he cannot make a move in his/her chance. You are playing this game with your friend. Given that you begin the game and both the players play optimally, output ‘L’ if you will lose or ‘W’ if you will win.

Example:

input: m = 1, n = 2

output: L

input: m = 2, n = 2

output: W

Теги #interview, game

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский gXa 2017-06-26 21:14:14 575 Initial revision (published)