Company: Flipkart DE IIT BHU
Difficulty: medium
Say or Cry Game Problem Description N players stand together in a circle, taking turns in a numbered sequence 1, 2, 3, ... . On each turn, whichever player is currently up must call out either 'c' or 's', following this rule: If the turn number is a multiple of 3 or has the digit 3 anywhere in it, the player is required to say 'c'. In every other case, the player is required to say 's'. A player who calls out the wrong letter is instantly out and leaves the circle. Once a player is removed, the very next turn passes to whichever player remains next in clockwise order. Play continues this way until a single player is left standing — the winner . You are given: An integer N — the number of players. A string S , where the i -th character is what was actually called out on the i -th turn ('c' or 's'). Work out: 1. The order in which players were eliminated (1-based player indices). 2. Who the winner is. Input Format: The first line contains an integer N — number of players. The second line