题目链接:进制转换_牛客题霸_牛客网
注意点:
stoi的用法
参考这里:C++中stoi函数_weixin_30502965的博客-CSDN博客
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
while (getline(cin,str))
{
cout <<stoi(str,0,16) <<endl;
}
return 0;
}
本文详细介绍了C++中的stoi函数如何处理十六进制字符串转换为整数,通过实例演示了其用法,并提供了相关博客链接作为参考。适合学习者理解进制转换在编程中的应用。
题目链接:进制转换_牛客题霸_牛客网
注意点:
stoi的用法
参考这里:C++中stoi函数_weixin_30502965的博客-CSDN博客
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
while (getline(cin,str))
{
cout <<stoi(str,0,16) <<endl;
}
return 0;
}
920
180
442

被折叠的 条评论
为什么被折叠?
&spm=1001.2101.3001.5002&articleId=123587444&d=1&t=3&u=e5745966217846418802350272804368)