#P10364. [PA 2024] Dzielniki
[PA 2024] Dzielniki
Background
PA 2024 5B1
Problem Description
This problem is translated from PA 2024 Round 5 Dzielniki.
We have chosen an integer from the interval . Your task is to guess this number. You do not have to guess blindly; you can ask questions. In each question, you may choose an integer in the interval , and we will tell you the number of divisors of .
To make the problem a bit harder, you need to solve test cases in a single run. The total number of questions is limited to .
Input Format
At the beginning of your program, you should not use #include "dzilib.h" to include the interactive library.
You need to implement the following function to solve this problem.
void Solve():The program will call this function only once. In this function, you must implement all the logic for guessing all test cases.
You may call the following functions.
int GetT():Returns the value of .long long GetN():Returns the value of .int GetQ():Returns the value of .long long GetC():Returns the value of .int Ask(long long y):Returns the number of divisors of the sum of the hidden number and . You must ensure .void Answer(long long x):Make an answer. This function has no return value.
If the total number of calls to Ask() exceeds , your program will be judged as Wrong Answer. If for any call to Answer(), the number you guessed is different from the correct answer, your program will also be judged as Wrong Answer.
Hint
Constraints
| Subtask ID | ||||
|---|---|---|---|---|
Translated by ChatGPT 5