QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#611800#6749. TargetxiaofangerWA 0ms3712kbC++17710b2024-10-04 22:49:432024-10-04 22:49:45

Judging History

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

  • [2024-10-04 22:49:45]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3712kb
  • [2024-10-04 22:49:43]
  • 提交

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 < 5 ; 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 = 4 ; 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: 0
Wrong Answer
time: 0ms
memory: 3712kb

input:

0.5 0.25

output:

11111111121

result:

wrong answer wa