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