首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Ranz
2026年1月30日 03:11
进制转换2 题解:
P1259
回复 0
|
赞 1
|
浏览 212
#include<bits/stdc++.h> int main(){ unsigned long long num; while(scanf("%llx",&num) != EOF){ printf("%llu\n",num); } return 0; }
mlx
2026年1月29日 20:42
进制转换2 题解:
P1259
回复 0
|
赞 7
|
浏览 175
#include<iostream> using namespace std; int get(char c) { if(c>='0'&&c<='9') return c-'0'; else return 10+c-'A'; } int main() { string str; while(cin>>str) { int res=0; for(int i=2;i<str.size();i++) res=res*16+get(str[i]); cout...
曾不会
2026年1月24日 09:50
进制转换2 题解:
P1259
回复 0
|
赞 3
|
浏览 275
#include<stdio.h> #include<string.h> int main() { //输入 char s[100]; char ss[100]; while(scanf("%s",s)!=EOF) { int l=strlen(s); int k...
bro
2026年1月21日 15:07
进制转换2 题解:c++
P1259
回复 0
|
赞 4
|
浏览 267
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin >> s){ string str = s.substr(2); int num = 0; for(int i = 0;i < str.size(); i++){ &...
星空菌
2026年1月7日 19:33
进制转换2 题解:
P1259
回复 0
|
赞 5
|
浏览 378
#include<bits/stdc++.h> using namespace std; //从末尾开始累加 long long hexToDec(string s){ long long int sum = 0; int term = 0; for (int i = s.length()-1; i >= 0; i--){ if(s[i]>='0'&&s[i]<='9') sum = sum + (s[i]-'0') * pow(16,term);...
cczz
2025年8月3日 17:04
进制转换2 题解:
P1259
回复 0
|
赞 15
|
浏览 978
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; while(scanf("%s",s) != EOF){ int res = 0; int len = strlen(s); for (int i = 2 ; i < len; i++){ res *= 16; if(s[i] >= '0' && s[i] <= '9') res += (s[i] - '0'); // else if(s...
无名1
2025年6月25日 19:11
进制转换2 题解:C++ 懒人写法
P1259
回复 0
|
赞 11
|
浏览 849
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int res=0,m; for(int i=s.length()-1;i>=2;i--){ m=s[i]-'0'; if(s[i]=='A'){ m=10; }else if(s[i]=='B'){ m=11; }else if(s[i]=='C'){ m=12; }else if(s[i]==...
阿灿
2025年3月18日 18:54
进制转换2 题解:scanf("%x",&x)这样不就好了吗兄弟们
P1259
回复 0
|
赞 19
|
浏览 2.0k
#include<bits/stdc++.h> using namespace std; int main(){ int x; while(scanf("%x",&x)!=EOF){ cout<<x<<endl; } }
西电机试专家
2025年3月11日 20:42
进制转换2 题解:very good
P1259
回复 0
|
赞 41
|
浏览 1.7k
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int ans=0; for(int i=2;i<s.size();i++){  ...
jaygee_
2025年3月6日 14:28
进制转换2 题解:
P1259
回复 0
|
赞 9
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; int main() { string s; while(cin >> s) { cout << stoi(s, nullptr, 16) << endl; } return 0; }
1
2
3
4
5
题目
进制转换2
题解数量
46
发布题解
在线答疑
热门题解
1
进制转换2 题解:
2
进制转换2 题解:
3
进制转换2 题解:
4
进制转换2 题解:very good
5
进制转换2 题解:
6
进制转换2 题解:
7
进制转换2 题解:scanf("%x",&x)这样不就好了吗兄弟们
8
进制转换2 题解:
9
进制转换2 题解:
10
进制转换2 题解: