QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#767067 | #9577. Ah? It's Not Yesterday Once More? | 7_divided_by_3 | AC ✓ | 3ms | 3724kb | C++23 | 400b | 2024-11-20 19:43:52 | 2024-11-20 19:43:59 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
int ask(int n)
{
cout << "? " << n << endl;
int x;
cin >> x;
return x;
}
void ans(int n)
{
cout << "! " << n << endl;
}
void solve()
{
int l, r;
cin >> l >> r;
ans(l + ask(l));
}
int main()
{
int t;
cin >> t;
while (t--)
solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3724kb
input:
2 20 25 1 100 200 59
output:
? 20 ! 21 ? 100 ! 159
result:
ok OK (2 test cases)
Test #2:
score: 0
Accepted
time: 3ms
memory: 3664kb
input:
100 167959139 481199252 15331911 336470888 634074578 146222115 642802746 740396295 42323925 579721198 773386884 131388084 396628655 503722503 71911375 202647942 971207868 672009513 2087506 268792718 30252687 46761498 443917727 352444778 16843338 125908043 16839708 691952768 717268783 15087681 150414...
output:
? 167959139 ! 183291050 ? 336470888 ! 482693003 ? 642802746 ! 685126671 ? 579721198 ! 711109282 ? 396628655 ! 468540030 ? 202647942 ! 874657455 ? 2087506 ! 32340193 ? 46761498 ! 399206276 ? 16843338 ! 33683046 ? 691952768 ! 707040449 ? 150414369 ! 261201327 ? 519096230 ! 529073882 ? 45277106 ! 76120...
result:
ok OK (100 test cases)
Test #3:
score: 0
Accepted
time: 2ms
memory: 3640kb
input:
100 361667059 361667062 1 966088223 966088226 2 776686324 776686326 2 963822972 963822973 0 909032609 909032613 1 354392326 354392327 0 719792919 719792920 0 114234328 114234332 3 396337755 396337758 0 11308832 11308832 0 920744015 920744016 0 35937909 35937909 0 949718872 949718874 0 736407739 7364...
output:
? 361667059 ! 361667060 ? 966088223 ! 966088225 ? 776686324 ! 776686326 ? 963822972 ! 963822972 ? 909032609 ! 909032610 ? 354392326 ! 354392326 ? 719792919 ! 719792919 ? 114234328 ! 114234331 ? 396337755 ! 396337755 ? 11308832 ! 11308832 ? 920744015 ! 920744015 ? 35937909 ! 35937909 ? 949718872 ! 94...
result:
ok OK (100 test cases)