文章
5
粉丝
10
获赞
5
访问
803
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const unsigned ll MAXNUM = ((ll)1 << 32) - 1;
int main() {
int t;
cin >> t;
while (t--) {
string s;
cin >> s;
ll n1 = bitset<33>(s).to_ullong() + 1, n2 = n1 + 2;
cout << (n1 > MAXNUM ? bitset<33>(n1).to_string() : bitset<32>(n1).to_string()) << endl;
cout << (n2 > MAXNUM ? bitset<33>(n2).to_string() : bitset<32>(n2).to_string()) << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发