QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#410371#6749. Targetyi_y#TL 0ms3664kbC++11272b2024-05-13 22:26:442024-05-13 22:26:46

Judging History

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

  • [2024-05-13 22:26:46]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:3664kb
  • [2024-05-13 22:26:44]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define eps (1e-4)-(1e-6)
int main()
{
	double a,b;
	cin>>a>>b;
	string s;
	double del=eps;
	while(fabs(a-b)>del)
	{
		if(b<0.5)b*=2,s="1"+s;
		else b=b*2-1,s="2"+s;
		//del*=2;
	}
	cout<<s<<'\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3664kb

input:

0.5 0.25

output:

1

result:

ok ok

Test #2:

score: -100
Time Limit Exceeded

input:

1 0.75

output:


result: