QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#383920#6749. TargetTeiosama#WA 0ms3724kbC++17348b2024-04-09 18:50:502024-04-09 18:50:50

Judging History

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

  • [2024-04-09 18:50:50]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3724kb
  • [2024-04-09 18:50:50]
  • 提交

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