题解 | #进制转换#
进制转换
https://www.nowcoder.com/practice/8f3df50d2b9043208c5eed283d1d4da6
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
string hex;
int ans;
while (cin >> hex) {
sscanf(hex.c_str(), "0x%x", &ans);
cout << ans;
}
}
// 64 位输出请用 printf("%lld")

查看5道真题和解析
360集团公司氛围 376人发布