QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#611808 | #6749. Target | xiaofanger | WA | 0ms | 3880kb | C++17 | 710b | 2024-10-04 22:51:39 | 2024-10-04 22:51:40 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void solve() {
double a , b;
cin >> a >> b;
if(b == 1){
for(int i = 0 ; i < 49 ; i++) cout << 2;
return;
}
vector<int> B(8);
cout << 1;
for(int i = 0 ; i < 7 ; i++){
cout << 1;
b *= 2;
if(b >= 1) B[i] = 1 , b--;
else B[i] = 0;
}
// cout << '\n';
// for(int i = 0 ; i < 5 ; i++) cout << B[i] << ' ';
// cout << '\n';
for(int i = 7 ; i >= 0 ; i--){
if(B[i]) cout << 2;
else cout << 1;
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int __ = 1;
//cin >> __;
while(__--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3880kb
input:
0.5 0.25
output:
1111111111111121
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
1 0.75
output:
1111111111111122
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
1 0
output:
1111111111111111
result:
ok ok
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3712kb
input:
0.361954 0.578805
output:
1111111111212112
result:
wrong answer wa