题解1053:平均值的计算(c++) 解题思路:题目说让他们加起来,然后求到平均值,最后找到里面十个数其中有几个数是大于平均值并输出我们可以使用for循环十次,一次是记录数字,一次是加起来,一次是计算有几个数大于平均值可以使用数组,用来记录数字之后,接着用for循环一个一个数来比较为止注意事项:1.本人代码可能有编译错误的可能性, 题解列表 2022年10月15日 0 点赞 1 评论 1750 浏览 评分:9.9
1999-回文判断(简洁) ```cpp#include#includeusingnamespacestd;intmain(){longlongn;//longlong数据最大值占19位。使用int无法通过测试cin>>n;//strings=to_string(n);//dev-c++中无法使用to_string函数//但是能 题解列表 2022年10月15日 0 点赞 0 评论 585 浏览 评分:0.0
1952-求长方形面积(简洁) 摘要:```cpp #include using namespace std; int main() { int l,w; cin >>l >>w; cout …… 题解列表 2022年10月15日 0 点赞 0 评论 655 浏览 评分:0.0
1867-王牌花色(简洁) ```cpp/*1.字符比较大小实际是比较它们的ASCII码值2.扑克牌的片面实际从小到大:3,4,5,6,7,8,9,10,J,Q,K,A,2但此题是我实现的是2,3,4,5,6,7,8,9,10,A,J,Q,K3.string变量的定义需要加上头文件cstring。 题解列表 2022年10月15日 0 点赞 0 评论 576 浏览 评分:0.0
1866-三位数反转(简洁) 摘要:```cpp /* 注意点: 1.多组数据输入,使用while(cin >>n){} 2.不需要考虑输入数字个位为0的情形 */ #include using namespace st…… 题解列表 2022年10月15日 0 点赞 0 评论 669 浏览 评分:0.0
1857-姜太公钓鱼(简洁) 摘要:```cpp #include using namespace std; int main() { int a[100]; int n,s=0; cin >>n; for(…… 题解列表 2022年10月15日 0 点赞 0 评论 577 浏览 评分:0.0
1812-输入输出练习之输出图案(简洁) 摘要:```cpp #include using namespace std; int main() { char x; cin >>x; for(int i=1;i0;j--) …… 题解列表 2022年10月15日 0 点赞 0 评论 581 浏览 评分:0.0
快速排序 求解 时间复杂度低 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N = 1e6 + 10;int n;int a[N];voi…… 题解列表 2022年10月15日 0 点赞 0 评论 471 浏览 评分:0.0
明明的随机数 摘要:解题思路:先排序,用continue语句去重注意事项:参考代码:#include<iostream>using namespace std;main(){ int n,i,j,s=0,t,a[100]…… 题解列表 2022年10月15日 0 点赞 0 评论 591 浏览 评分:9.9
绝对值排序利用set容器 摘要:解题思路:去掉重复使用set容器注意事项:参考代码:# include <iostream> # include <set> # include <math.h> using namespace…… 题解列表 2022年10月15日 0 点赞 0 评论 453 浏览 评分:0.0