QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#611851#6736. Alice and BobxiaofangerWA 0ms3820kbC++17625b2024-10-04 23:15:452024-10-04 23:15:47

Judging History

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

  • [2024-10-04 23:15:47]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3820kb
  • [2024-10-04 23:15:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long

void solve() {
	
	double a , b;
	cin >> a >> b;
	
	vector<int> B(50);
	
	for(int i = 0 ; i < 25 ; i++){
		b *= 2;
		if(b >= 1) B[i] = 1 , b--;
		else B[i] = 0;
	}

	for(int i = 0 ; i < 25 ; i++) cout << B[i];
	cout << '\n';
	
	//for(int i = 0 ; i < 25 ;i++) cout << 1;
	for(int i = 24 ; 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;
}








 

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3820kb

input:

1

output:

0000000000000000000000000
1111111111111111111111111

result:

wrong output format Expected integer, but "0000000000000000000000000" found