Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <map>
- #include <string>
- #include <cstdlib>
- #include <algorithm>
- using namespace std;
- int main() {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- string num;
- getline(cin, num);
- unsigned char byte = 0;
- uint64_t res = 0, tmp = 0;
- int cnt = 1;
- for (int i = 0; i < num.size(); ++i) {
- byte = num[i];
- byte ^= ((byte >> 7) << 7);
- tmp = byte;
- res |= (tmp << (7 * i));
- }
- cout << res << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement