1095: The 3n + 1 problem 摘要:解题思路:用 while() 每次接收两个数,用 for() 对两个数间所有数进行遍历,并更新最大循环长度。注意事项:测试用例里面有 num1 > num2 的,一开始完全没意识到,卡了很久。参考代码…… 题解列表 2022年04月27日 0 点赞 0 评论 363 浏览 评分:9.9
优质题解 1094: 字符串的输入输出处理 摘要:解题思路:(1)带空格的要用 cin.getline() 接收输入,接收完就输出。(2)不带空格的直接用 cin 接收输入,接受完就输出。注意事项:输入完 N 后要用 getchar() 接收后面紧跟…… 题解列表 2022年04月27日 1 点赞 1 评论 3948 浏览 评分:9.9
陶陶摘苹果(C++简单题解) 摘要:解题思路:用淘淘的身高加上板凳的高度,就是淘淘能够到的高度,再和苹果的高度进行判断累加,最后输出;注意事项:加上板凳的30;参考代码: #includeusing namespace std;int …… 题解列表 2022年04月27日 0 点赞 0 评论 1627 浏览 评分:7.3
三个数字的排序(C++语言) 摘要:解题思路:输入a[1]至a[3],使用自带函数对输入数组进行排序注意事项:需要使用万能头文件参考代码:#include<bits/stdc++.h>//万能头文件using namespace std…… 题解列表 2022年04月27日 0 点赞 0 评论 490 浏览 评分:9.9
成绩评定(c++语言) 摘要:解题思路:根据题意if判断注意事项:if语句的应用;参考代码:#include<iostream>using namespace std;int main(){ int a; cin>>a…… 题解列表 2022年04月27日 0 点赞 0 评论 780 浏览 评分:8.0
求长方形面积 摘要:解题思路:首先,我们都知道长方形的周长和面积,周长:(a+b)*2,面积:a*b。注意事项:c:和S:要双引号参考代码:#include<iostream>using namespace std;in…… 题解列表 2022年04月27日 0 点赞 1 评论 922 浏览 评分:8.7
1806: [编程基础]输入输出练习之第二个数字 摘要:解题思路:题目让输入3个数,输出第2个输入的数注意事项:不是输出第2大的数参考代码:#include<iostream>using namespace std;int main(){ int a…… 题解列表 2022年04月27日 0 点赞 0 评论 1063 浏览 评分:6.0
利用C++ 集合set特性解题 摘要:``` #include #include #include using namespace std; int M,N; int a[3]; set T; int main(){ …… 题解列表 2022年04月27日 0 点赞 0 评论 519 浏览 评分:9.9
1821: 蓝桥杯2014年第五届真题-拼接平方数 摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split()) ls=[] for i in range(1,int(b**(1/2))+1): ls.appen…… 题解列表 2022年04月27日 0 点赞 0 评论 437 浏览 评分:9.9
指针数组的解 摘要:#include int main(){ char *p[7]={{"Sunday"}, {"Monday"}, {"Tuesday"}, \ {"Wednesday"},…… 题解列表 2022年04月27日 0 点赞 0 评论 752 浏览 评分:9.9