题解列表

筛选

1286基础解法(Python)

摘要:解题思路:最大-最小注意事项:合理运用数据类型简化处理难度参考代码:m = int(input())lst_1 = sorted(map(int, input().split()))lst_2 = s……

数字统计C++代码

摘要:#### 判断L-R中的每一个数,检验其中有几个2 ## 参考代码: ```cpp #include using namespace std; int main(){ int l,r,s……

二级C语言-计负均正

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[20]; int i; int s=0; int sum=0; double c=0; for(i=……

如何计算副对角线

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main() {    int a[3][3];    for(int i ……

简单的冒泡排序

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void bubblesort(int *a,int n){    bool fla……

单个字符拼接输出

摘要:解题思路:注意事项:不要用cin<< 因为根据题目条件,字符串中可能含有空格参考代码://#include <bits/stdc++.h>#define _CRT_SECURE_NO_WARNINGS……

c语言代码+循环解决买书问题

摘要:解题思路:分别求出每种书最多能卖多少本,然后用循环代入计算注意事项:参考代码:/*小明手里有nn元钱全部用来买书,书的价格为10元,20元,50元,100元。问小明有多少种买书方案?(每种书可购买多本……