QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#474878 | #6749. Target | SinhoMoeme | WA | 0ms | 1508kb | C++23 | 269b | 2024-07-13 08:54:56 | 2024-07-13 08:54:56 |
Judging History
answer
#include<cstdio>
constexpr int MAX=50;
double b;
bool ans[MAX+1];
int main(){
scanf("%*lf%lf",&b);
for(int i=0;i<=MAX;++i){
b*=2;
if(b>=1){
ans[i]=1;
--b;
}
else ans[i]=0;
}
for(int i=MAX;i>=0;--i) putchar(ans[i]?'2':'1');
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1508kb
input:
0.5 0.25
output:
111111111111111111111111111111111111111111111111121
result:
wrong answer wa