文章
2
粉丝
131
获赞
0
访问
10.9k
#include<bits/stdc++.h>
using namespace std;
int main(){
string str;
while(cin >> str){
int count = 0;
long long answer = 0;
for(int i = str.size() - 1;i > 1;--i){
if(str[i] >= '0' && str[i] <= '9'){
answer += (str[i] - '0') * pow(16,count++);
}else{
answer += (10 + str[i] - 'A') * pow(16,count++);
}
}
cout << answer << endl; &nb...
登录后发布评论
暂无评论,来抢沙发