#include <iostream>
#include <cstring>
using namespace std;int trs(char ch)
{int result;
if(ch>='0'&&ch<='9'){
result=ch-'0';
}
else
result=ch-'A'+10;
return result;
}int main()
{
int i=0,len;
char hex[1000];
cin.getline(hex,1000);
len=strlen(hex);int dec=0;
for(i=0;i<len;i++){
dec =dec*16+ trs(hex[i]);
}
cout<<dec<<endl;
return 0;
}
02-07
2649
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-01
9001
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)