benchmarks.wiki / Public workspace
LiveCodeBench / 1899_A / A. Game with Integers
Problem
Scored by the benchmark’s own harness. Use the benchmark’s own evaluation harness to check your work.
contest date
2023-10-17T00:00:00
contest id
1899
difficulty
easy
platform
codeforces
question content
Vanya and Vova are playing a game. Players are given an integer . On their turn, the player can add to the current integer or subtract . The players take turns; Vanya starts. If after Vanya's move the integer is divisible by , then he wins. If moves have passed and Vanya has not won, then Vova wins.
Write a program that, based on the integer , determines who will win if both players play optimally.
Input
The first line contains the integer () — the number of test cases.
The single line of each test case contains the integer ().
Output
For each test case, print "First" without quotes if Vanya wins, and "Second" without quotes if Vova wins.Sample Input 1:
6
1
3
5
100
999
1000
Sample Output 1:
First
Second
First
First
Second
First
Plain-text mathematical notation (without MathML)
Vanya and Vova are playing a game. Players are given an integer n. On their turn, the player can add 1 to the current integer or subtract 1. The players take turns; Vanya starts. If after Vanya's move the integer is divisible by 3, then he wins. If 10 moves have passed and Vanya has not won, then Vova wins. Write a program that, based on the integer n, determines who will win if both players play optimally. Input The first line contains the integer t (1≤t≤100) — the number of test cases. The single line of each test case contains the integer n (1≤n≤1000). Output For each test case, print "First" without quotes if Vanya wins, and "Second" without quotes if Vova wins.Sample Input 1: 6 1 3 5 100 999 1000 Sample Output 1: First Second First First Second First
Original LaTeX notation
Vanya and Vova are playing a game. Players are given an integer $n$. On their turn, the player can add $1$ to the current integer or subtract $1$. The players take turns; Vanya starts. If after Vanya's move the integer is divisible by $3$, then he wins. If $10$ moves have passed and Vanya has not won, then Vova wins. Write a program that, based on the integer $n$, determines who will win if both players play optimally. Input The first line contains the integer $t$ ($1 \leq t \leq 100$) — the number of test cases. The single line of each test case contains the integer $n$ ($1 \leq n \leq 1000$). Output For each test case, print "First" without quotes if Vanya wins, and "Second" without quotes if Vova wins.Sample Input 1: 6 1 3 5 100 999 1000 Sample Output 1: First Second First First Second First
question title
A. Game with Integers
starter code
Code
Discussion
No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.
See how this is scored Scored by the benchmark’s own harness
Artifacts
Code, notes and reproducible work shared by participants. Files are served from a separate origin.
No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.
Source and history
initial import