Placement AptitudeVery hardProduct company OA · CAT LRDI level

Two players take turns removing coins from a single pile. On each turn a player must remove exactly 1, 3 or 4 coins, and the player who removes the last coin wins. Both play perfectly. For how many starting pile sizes from 1 to 100 (inclusive) does the SECOND player win?

  1. A. 25
  2. B. 29
  3. C. 28
  4. D. 33

Correct answer: B. 29

Mark the losing sizes (the player to move loses): 0 loses; 1, 3, 4 win by taking everything; 2 loses (its only move goes to 1); 5 and 6 win by moving to 2; 7 loses (it can only reach 6, 4 or 3); 8 wins (take 1 to reach 7); 9 loses (it can reach only 8, 6, 5). From here the pattern repeats every 7: the mover loses exactly when n ≡ 0 or 2 (mod 7). From 1 to 100: multiples of 7 give 14 (7 … 98) and n ≡ 2 gives 15 (2 … 100). Total 29. 28 forgets that 100 ≡ 2; 33 = 100/3 treats it like a 'take 1 to 3' game.

More Logical Reasoning for Placements questions

Exams that ask this topic