QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#693123 | #6749. Target | R73757565# | WA | 0ms | 3888kb | C++23 | 544b | 2024-10-31 15:34:41 | 2024-10-31 15:34:41 |
Judging History
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];
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3888kb
input:
0.5 0.25
output:
11111111111111112111
result:
wrong answer wa