题解 | #进制转换#

进制转换

https://www.nowcoder.com/practice/8f3df50d2b9043208c5eed283d1d4da6

// #include <iostream>
// using namespace std;

// int main() {
//     int a, b;
//     while (cin >> a >> b) { // 注意 while 处理多个 case
//         cout << a + b << endl;
//     }
// }
// // 64 位输出请用 printf("%lld")

#include <bits/stdc++.h>
#include <string>
using namespace std;

int main(){
    string str;
    while (cin >> str) {
        cout << stoi(str, 0, 16) << endl;
    }
    return 0;
}

全部评论

相关推荐

03-02 02:44
门头沟学院 Java
墨西哥大灰狼:说实话尚庭公寓还是尽量换了,全是增删改查没什么意义
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务