QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#151478#5556. Diabolic Doofenshmirtzvalue0WA 1ms3608kbC++20467b2023-08-26 19:13:472023-08-26 19:13:52

Judging History

你现在查看的是最新测评结果

  • [2023-08-26 19:13:52]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3608kb
  • [2023-08-26 19:13:47]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll n, k;

ll query(ll x)
{
	cout<<"? "<<x<<endl;
	std::cout << std::flush;
	ll res;
	cin>>res;
	return res;
}

void solve()
{
	ll r = 1e12 + 10;
	ll m = query(r);
	ll t = r - m;
	t *= 2;
	ll ans = query(t);
	cout<<"! "<<ans<<endl;
	std::cout << std::flush;
}

int main()
{
    int t = 1;
    //	cin>>t;
    while (t--)
    {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3608kb

input:

32
0

output:

? 1000000000010
? 1999999999956
! 0

result:

wrong answer Wrong answer: wrong lap length