QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#413202#6749. TargetalbionWA 1ms3968kbC++17352b2024-05-17 09:31:132024-05-17 09:31:13

Judging History

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

  • [2024-05-17 09:31:13]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3968kb
  • [2024-05-17 09:31:13]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
double a,b;
int cnt;
bool check(double x,double y)
{
  if (abs(x-y)>1e-4) return false;
  return true;
}
int main()
{
  cin>>a>>b;
  cnt=0;
  while (check(a,b)==false && cnt<50)
    {
      if (a>b) a=a*0.5,printf("1");
        else a=(a+1)*0.5,printf("2");
      ++cnt;
	}
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3852kb

input:

0.5 0.25

output:

1

result:

ok ok

Test #2:

score: 0
Accepted
time: 1ms
memory: 3844kb

input:

1 0.75

output:

12

result:

ok ok

Test #3:

score: 0
Accepted
time: 1ms
memory: 3968kb

input:

1 0

output:

11111111111111

result:

ok ok

Test #4:

score: -100
Wrong Answer
time: 1ms
memory: 3852kb

input:

0.361954 0.578805

output:

21212121212121212121212121212121212121212121212121

result:

wrong answer wa