#include<iostream>
#include<string>
using namespace std;
int main()
{
string A = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
string str;
while (cin >> str)
{
string str1=" ";
int t=1,num=0;
int i=str.length()-1;
for(int j=0;i-j>4;j++)
{
num = num+(str[i-j]-'0')* t;
t=t*2;
}
str1=A[num];
num=0;
t=1;
for(int a=0;a<=4;a++)
{
num += (str[a]-'0') * t;
t=2*t;
}
str1+=A[num];
cout << str1<<endl;
}
全部评论
(2) 回帖