https://pastein.ru/t/GOU

  скопируйте уникальную ссылку для отправки

Загрузка данных


#include <iostream>
using namespace std;

int main() {
    unsigned int a = 42759;
    
    unsigned int lsb = a & 1;
    
    int pos = 0;
    unsigned int temp = a;
    while (temp >>= 1) pos++;
    
    unsigned int msb = (a >> pos) & 1;
    
    unsigned int result = (msb << pos) | lsb;
    
    cout << result;
    return 0;
}