#P9451. [ZSHOI-R1] 新概念报数
[ZSHOI-R1] 新概念报数
Background
What background does Div.2 A need?
Problem Description
Now Xttttr and his npy are playing a counting game, but they really like the number , so they made the following rules:
- If a number satisfies , then this number is illegal, and the other person must answer
No,Commander. - Otherwise, this number is legal, and the other person must answer the next legal number.
As someone sitting nearby, you of course do not know the fun of this game. You only want to know what the other person should answer after a certain count.
Input Format
The first line contains a positive integer , which indicates the number of queries.
The next lines each contain a natural number , which indicates the number called out by one person in this query.
Output Format
Output lines. Each line contains a positive integer or a string, indicating what the other person should answer for this query.
3
1
4
6
2
5
8
1
7
No,Commander
Hint
For of the testdata, and .
For another of the testdata, is a legal number.
For another of the testdata, is uniformly random within the value range.
For of the testdata, and .
Translated by ChatGPT 5