Two players play the following game: they pick a random number N (less than 2 billion) then,
starting from 1, take turns multiplying the number from the previous turn with either 2 or 9 (their choice). Whoever reaches N first wins.
The candidate should write a function that given N decides who wins (first or second player)?
starting from 1, take turns multiplying the number from the previous turn with either 2 or 9 (their choice). Whoever reaches N first wins.
The candidate should write a function that given N decides who wins (first or second player)?
No comments:
Post a Comment