AAAA 1 P1 - Even-Odd Sort
View as PDFThanks to his teacher, Todd, Steven finally understands even and odd numbers! To test his knowledge, Todd will play a game with Steven:
The game begins with a list of integers,
, and a variable
initially set to
.
With Steven going first, they will alternate turns picking and removing any integer from the list and updating the variable
to either
or
.
The game ends when there are no more integers in the list. Steven wins if the final value of is even, while Todd wins if it is odd.
If both players play optimally, who will win? Output Steven if Steven will win, and Todd otherwise.
Constraints
Subtask 1 [50%]
All are odd.
Subtask 2 [50%]
No additional constraints.
Input Specification
The first line will contain one integer, , the number of integers in the starting list.
The next line will contain space-separated integers,
, the integers in the starting list.
Output Specification
Output Steven if Steven will win, and Todd otherwise.
Sample Input 1
2
1 3
Sample Output 1
Todd
Sample Input 2
3
2 3 4
Sample Output 2
Steven
Comments