parent
93e490c1ed
commit
69839be8dc
Binary file not shown.
@ -1,23 +1,17 @@
|
|||||||
#include <bits/stdc++.h>
|
#include <bits/stdc++.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
int main() {
|
int main() {
|
||||||
int a = 10, b = 20;
|
int n;
|
||||||
|
char mx = '0';
|
||||||
cout << "a<<8=" << (a << 8) << endl;
|
cin >> n;
|
||||||
int x = 2560;
|
for (int i = 0; i < n; i++) {
|
||||||
// 101000000000
|
string s;
|
||||||
vector<int> q;
|
cin >> s;
|
||||||
while (x) {
|
for (int i = 0; i < s.size(); i++) {
|
||||||
q.push_back(x % 2);
|
if (s[i] > mx)
|
||||||
x /= 2;
|
mx = s[i];
|
||||||
|
}
|
||||||
|
cout << (mx <= '1') << " " << (mx <= '7') << " " << (mx <= '9') << " " << (mx <= 'F') << endl;
|
||||||
}
|
}
|
||||||
for (int i = q.size() - 1; i >= 0; i--) cout << q[i];
|
|
||||||
cout << endl;
|
|
||||||
|
|
||||||
a = (a << 8) | b;
|
|
||||||
|
|
||||||
b = a >> 8;
|
|
||||||
a = a & 0xff;
|
|
||||||
cout << a << " " << b << endl;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in new issue