SUPPU AND SAILU
All submissions for this problem are available.
Problem Description :
Today is the birthday of two girls named Supraja and Sailaja , Now both of them want to escape the party to their classmates , so they challanged themselves that they will play a game and the player who looses the game will give the party
There are N marbles on a table,In Each turn a player can take at least 2 and at most 7 marbles.
The game ends when the Number of marbles on the table become 1 or 0 , i.e when the player cannot take any marbles in the range [2,7] . The player who made the count of marbles 0 or 1 will be last player to end the game and be the looserIf these two players play optimally, which player will win the game. As Supraja being topper in her class with due respect given chance to always start the game.
- The first line of the input contains an integer T denoting the number of test cases.
- The description of T test cases follows.
- The next T lines contain integer N denoting number of marbles
- Output T lines, one for each test case, containing "Supraja" (without quotes) if Supraja wins the game, or "Sailaja" (without quotes) otherwise.
Subtask-1: (30 points)
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 10
Subtask-2: (30 points)
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 10^8
Subtask-3: (40 points)
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 10^15
Sample - 1
Input: 5 Output: Supraja
Sample - 2
Input: 3 Output: Sailaja
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, PYTH, PYTH 3.6, PYP3|
Fetching successful submissions
If you are still having problems, see a sample solution here.