题解列表

筛选

知道了怎么索引列表元素的下标

摘要:解题思路:注意事项:gan开始写的之前写过的选择排序的算法,和题目要求不同 ,这题学会了用列表点index索引列表的下标,学会互换位置,找到最大和最小值,和队首和队尾的互换位置挺好的还会用简洁的写法很……

阶乘求和题解

摘要:解题思路:可以用函数求出阶乘,最后累加求和注意事项:阶乘的范围要设置为long long 参考代码:#include<stdio.h>int main(){ long long int hanshu(……

C++处理数字位数与输出

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b[5],c; cin >> a; if (a / 100……

最直接法判断

摘要:解题思路:这是最直接的思路,将数字分离,求立方和相加,判断是不是相等,即可注意事项:水仙花是三位数,就是100到999,指定了范围参考代码:#include<stdio.h>int main(){ i……

1251: 统计字母个数(hashMap解法 )

摘要: 蛮简单的一题,可以用数组来处理,也可以用hashmap处理(PS:本人比较喜欢直观一点吧),用hashmap处理就当做复习一下hashmap的使用方法吧。 `……

1055 二级C语言转换

摘要:```c #include int main(){ int n; scanf("%d",&n); printf("%o",n); return 0; } ``````c ……

九九乘法表

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ for (int i = 1; i ……