QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#693123#6749. TargetR73757565#WA 0ms3888kbC++23544b2024-10-31 15:34:412024-10-31 15:34:41

Judging History

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

  • [2024-10-31 15:34:41]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3888kb
  • [2024-10-31 15:34:41]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main()
{
    double a,b;
    cin>>a>>b;
    string s;
    double res=1;
    double ans=0;
    s+='1';
    while(b>=1e-5){
        if(b>=res){
            s+='2';
            // ans=(ans+1)/2;
            b-=res;
        }
        else {
            s+='1';
            // ans=ans/2;
        }
        // cout<<ans<<endl;
        res/=2;
    }
    while(a>=1e-5){
        s+='1';
        a/=2;
    }
    for(int i=s.size()-1;i>=0;i--){
        cout<<s[i];
    }
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3888kb

input:

0.5 0.25

output:

11111111111111112111

result:

wrong answer wa