QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#694304 | #6749. Target | zxk# | WA | 0ms | 3744kb | C++17 | 579b | 2024-10-31 17:41:01 | 2024-10-31 17:41:07 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define enter cout<<"enter"<<'\n';
using namespace std;
typedef pair<int, int> PII;
typedef pair<double, int> PDD;
typedef long long LL;
const int inf = 1e18, mod = 1e9 + 7;
double exp1 = 1e-4;
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
double a, b;
cin >> a >> b;
cout << string(10, '1');
cout << 2;
a = 0.5;
while (abs(a-b) > exp1)
{
if (a > b)
{
a *= 0.5;
cout << 1;
}
else
{
a = a / 2 + 0.5;
cout << 2;
}
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3744kb
input:
0.5 0.25
output:
111111111121
result:
wrong answer wa