首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
408真题
专业课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
heart983
2025年3月23日 15:23
进制转换3 题解:
P1422
回复 2
|
赞 4
|
浏览 299
求大佬帮忙分析一下为啥是60% #include<bits/stdc++.h> using namespace std; int main(){ int m,n;//m进制转n进制 char str[105]; while(cin>>m>>n){ cin>>str; &...
霞鸣
2025年3月20日 10:51
P1422 进制转换3 答疑提问(Time Limited):
P1422
回复 3
|
赞 6
|
浏览 364
具体代码如下,想着写一个数组模拟进制转换的万用方法,算法复杂度应该是O(n^2),不理解为什么会导致超时,用于提交其他题目也是能成功通过的,个人初步推断是有特殊情况的用例没有考虑到导致bug才引起的超时,但实在找不到是哪种情况,麻烦大佬们给给意见,谢谢! #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <time.h> #...
ccccccyes
2024年8月26日 23:39
进制转换3 题解:
P1422
回复 4
|
赞 62
|
浏览 2.1k
vector总是越界输出,输出乱码 已扩充的值失效 //输入可能是字符和数字混合 //最大为36进制数就是只有26个字母 //输出也要字符和数字混合 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int m,n,w; long long num = 0; string str,ba; //不用vector<char> 就是string cin>...
jsd
2025年3月3日 10:46
P1422 进制转换3 答疑提问:
P1422
回复 2
|
赞 11
|
浏览 558
求助这个题当输入为 36 9 XYZZA765 时为什么没有输出呢 #include<bits/stdc++.h> using namespace std; int main() { long long m, n, x; cin>>m>>n>>x; string s = to_string(x); long long y = 0;  ...
小酒
2024年3月15日 17:17
进制转换3 题解:
P1422
回复 1
|
赞 55
|
浏览 1.6k
1422解题思路 最开始出现80%,最后修改sum的类型为long,Accepted!! #include <bits/stdc++.h> using namespace std; int main() { int m,n; char x; scanf("%d %d",&m,&n); getchar(); char b[105]; gets(b); int l=strlen(b); char a[105]={0}; long sum=0; //转化为10进制 for(int j=0;j...
myming
2024年7月20日 20:48
进制转换3 题解:
P1422
回复 0
|
赞 8
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; void f(int M, int N,char x[]){ long long ans = 0; int len = strlen(x); for (int i = 0; i < len; i++){ ans = ans * M; &nb...
15984861226
2024年7月14日 02:10
进制转换3 题解:X(M) -> n(10) -> ret(N)
P1422
回复 0
|
赞 5
|
浏览 716
思路:X(M) -> n(10) -> ret(N),第一次提交80%,将int改为long就100%。 代码(c++)如下: #include <iostream> using namespace std; void rank_reverse(char* a,long M,long N){ char Alpha[37]="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char alpha[37]="01...
iRR
2024年6月12日 17:34
进制转换3 题解:
P1422
回复 0
|
赞 2
|
浏览 695
#include<iostream> #include<stack> using namespace std; int main() { int a,b; cin>>a>>b; string s; cin>>s; long long sum = 0; for(int i = 0;i<s.size();i++) { sum *= a; if(s[i]<='9'&&s[i]>=0) sum+= s[i] - '0'; else sum += ...
中国人民万岁
2024年3月27日 23:17
进制转换3 题解:思想:m->10->n
P1422
回复 2
|
赞 3
|
浏览 973
#include <bits/stdc++.h> using namespace std; #define ll long long int val(char x) { if (x >= '0' && x <= '9') { return x - '0'; } else {  ...
中国人民万岁
2024年3月27日 23:19
进制转换3 题解:思想:m->10->n
P1422
回复 0
|
赞 3
|
浏览 721
#include <bits/stdc++.h> using namespace std; #define ll long long int val(char x) { if (x >= '0' && x <= '9') { return x - '0'; } else {  ...
1
2
3
4
题目
进制转换3
题解数量
33
发布题解
在线答疑
热门题解
1
进制转换3 题解:
2
进制转换3 题解:
3
进制转换3 题解:
4
P1422 进制转换3 答疑提问:
5
进制转换3 题解:
6
仔细读题,M-10-N
7
P1422 进制转换3 答疑提问(Time Limited):
8
进制转换3 题解:X(M) -> n(10) -> ret(N)
9
进制转换3 题解:
10
搭桥过程:M转换10进制,再转N进制;c++