题解列表

筛选

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

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

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

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

Python解决字符统计问题——字典是个好东西

1.首先输入:```pythona=input()```然后把输入的东西循环处理:```pythond={}foriina:d[i]=d.get(i,0)+1```没错,非常简单的方法,这就统计完了。接下来排序:因为字典是无序的,无法排序,所以先转换成列表再排序。

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 ……

宏定义和函数找最大值

摘要:解题思路:用三目运算符非常简单注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;#define max(a,b,c) (……

循环和if()语句

摘要:解题思路:注意事项:参考代码:     #include<stdio.h>    int main () {         int x,n;         scanf("%d",&x);