QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#383917#6749. TargetTeiosama#WA 1ms3852kbC++17394b2024-04-09 18:49:452024-04-09 18:49:45

Judging History

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

  • [2024-04-09 18:49:45]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3852kb
  • [2024-04-09 18:49:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b;cin>>a>>b;
	if(a==b)
	{
		cout<<"1";
		return 0;
	}
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;
}

詳細信息

Test #1:

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

input:

0.5 0.25

output:

2

result:

wrong answer wa