QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#618893 | #6749. Target | xiojoy# | WA | 0ms | 3944kb | C++20 | 512b | 2024-10-07 11:25:39 | 2024-10-07 11:25:39 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b;
cin >> a >> b;
int cnt = 0;
vector<int> p(30);
while(b > 1e-6) {
b *= 2;
if (b >= 1) {
p[cnt++] = 1;
b -= 1;
} else {
p[cnt++] = 0;
}
}
for(int i = 0; i < 13; ++i){
cout << "1";
}
for(int i = cnt - 1; i >= 0; --i){
if(p[i] == 1) cout <<"2";
else cout << "1";
}
cout << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3696kb
input:
0.5 0.25
output:
111111111111121
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
1 0.75
output:
111111111111122
result:
ok ok
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3944kb
input:
1 0
output:
1111111111111
result:
wrong answer wa