#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
 string word;
 while (cin >> word)
 {
  int word_lenth = word.size();
  int temp=0;
  int n = 0;
  for (int i = 2; i < word_lenth; i++)
  {
   if ((word[i] >= 'A') && (word[i] <= 'F'))
   {
    n = word[i] - 'A' + 10;;
   }
   if ((word[i] >= '0') && (word[i] <= '9'))
   {
    n = word[i]-'0' ;
   }
   temp = temp * 16 + n;//最重要的一步
  }
  cout << temp << endl;

 }
 return 0;
}

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2021-12-01
  • 2021-12-01
  • 2021-12-01
  • 2022-12-23
  • 2021-07-09
  • 2021-10-12
相关资源
相似解决方案