#include#include #include #include using namespace std; string a,b,s="",k[20]={"0000","1000","0100","1100","0010","1010","0110","1110","0001","1001","0101","1101","0011","1011","0111","1111"}; string t="0123456789ABCDEF"; int i,j,len; bool n=0; int main() { cin >>a; for (i=a.size()-1;i>=0;i--) s+=k[t.find(a[i])]; len=s.size(); if (len%3==1) { len+=2; s+="00"; } else if (len%3==2) { len+=1; s+="0"; } for (i=0;i =0;i--) { if (b[i]!=48) { n=1; cout < 欢迎分享,转载请注明来源:内存溢出
聪明人的游戏提高篇第二章综合练习:hex
赞
(0)
打赏
微信扫一扫
支付宝扫一扫
cmake - 01E - installing
上一篇
2022-11-06
linux c将数据结构整体写入文件并整体读取数据
下一篇
2022-11-06
评论列表(0条)