Jam的计数法 (C++代码) 摘要:解题思路:第一步:在当前Jam数bdfij中,从后往前找,找到第一个“后继字母没出现在当前Jam数中”的字母。j的后继是k,不可用,i的后继j已出现在Jam数中,f的后继字母g没出现,所以是f;第二步…… 题解列表 2018年05月31日 0 点赞 0 评论 1042 浏览 评分:0.0
检查一个数是否为质数 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n; while(cin>>n) {…… 题解列表 2018年05月30日 0 点赞 0 评论 804 浏览 评分:3.6
最多约数问题 (C++代码) 摘要:解题思路:首先,考虑如何求解一个数有多少个约数,1的约数只有1个,其他的数字,对其进行质因数分解可以得到 a = b1^c1 * b2^c2 * b3^c3 * ....如下结果,根据排列组合原理可以…… 题解列表 2018年05月30日 11 点赞 1 评论 1968 浏览 评分:6.8
蛇形填数 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int j; int a[100][100] = { 0 …… 题解列表 2018年05月29日 2 点赞 0 评论 1562 浏览 评分:4.4
查找最大元素 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> using namespace std; char a[105]; int main()…… 题解列表 2018年05月28日 0 点赞 0 评论 994 浏览 评分:0.0
杨辉三角 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int a[31][31]={0}; int main() { int n;…… 题解列表 2018年05月28日 0 点赞 0 评论 1204 浏览 评分:9.9
优质题解 校门外的树 (C++代码) 摘要:解题思路:用较大的数组标记,开始时全部设置为1(表示有树),循环控制输入次数,依次输入开始和结尾数据,在范围内的设置为0(没树)。注意事项:标记数组一定要够大。参考代码:#include<iostre…… 题解列表 2018年05月27日 13 点赞 3 评论 2679 浏览 评分:8.8
C语言程序设计教程(第三版)课后习题6.7 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int N; cin>>N; int sum=0; for(int …… 题解列表 2018年05月27日 0 点赞 0 评论 791 浏览 评分:0.0
明明的随机数 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int N,k,*V; int …… 题解列表 2018年05月27日 0 点赞 0 评论 556 浏览 评分:0.0
字符逆序 (C++代码) 摘要:解题思路:algorithm头文件注意事项:参考代码:#include <iostream>#include <algorithm>#include <string> using namespace …… 题解列表 2018年05月26日 4 点赞 0 评论 652 浏览 评分:0.0