QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#383920 | #6749. Target | Teiosama# | WA | 0ms | 3724kb | C++17 | 348b | 2024-04-09 18:50:50 | 2024-04-09 18:50:50 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b;cin>>a>>b;
while(fabs(a-b)>0.0001)
{
double w1=2*b;
double w2=2*b-1;
if(b==0)
{
a/=2;
cout<<"1";
}
else if(b==1)
{
a=a/2+0.5;cout<<"2";
}
else if(w1>=0&&w1<=1)
{
b*=2;
cout<<"2";
}
else{
b=2*b-1;
cout<<"1";
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3724kb
input:
0.5 0.25
output:
2
result:
wrong answer wa