码迷,mamicode.com
首页 > 其他好文 > 详细

ecnu 2019 Bit operation

时间:2018-06-19 19:30:44      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:its   space   std   unsigned   namespace   bit   span   enc   scan   

#include<bits/stdc++.h>
using namespace std;

unsigned int encrypt(unsigned int x){
    unsigned int low=x>>16,up=x<<16;
    low=((~low)<<16)>>16;
    up=up^(low<<16);
    return low|up;
}

int main(){
    unsigned int u;
    while(~scanf("%d",&u)){
        printf("%.2X\n",encrypt(u));
    }
}

 

ecnu 2019 Bit operation

标签:its   space   std   unsigned   namespace   bit   span   enc   scan   

原文地址:https://www.cnblogs.com/TAMING/p/9200642.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!