题解列表

筛选

不是最简单的,但肯定是最容易理解的

解题思路:一个双重for循环就行了,第一行有特殊规律,先定义好第一行就行了,其余行列位置都其等于右上角的数减1。注意事项:注意循环顺序,要使该位置用右上角的数,而不能使用其左下角的数参考代码:whileTrue:try:N=int(input())F=[[0for_inrange(N)]for_inr

数的划分c++

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>……

冒泡,最不合适的排序算法

摘要:解题思路:冒泡注意事项:比较烦参考代码:#include<stdio.h>int main(){ int arr[3]; int i,j,temp; for(i=0;i<3;i++){ scanf(……

不要理解错题目,其实很简单

摘要:解题思路:注意事项:                                   题目无需输入与输出要在同一行,且目前无法完成退行操作!参考代码:#include<stdio.h>int ma……

明明的随机数(Python代码) 3行完事 附解题思路

##解题思路:首先使用***列表推导式***来进行把***input().split()***分段后的列表元素转为**int类型**,接着使用***set()***直接转为集合进行***去重***操作,转为列表后直接使用***sorted()***来排序再使用***列表推导式***将列表内的元素转为*

Hello,world!

摘要:```python m = [int(i) for i in input().split()] n = [int(i) for i in input().split()] s = "" for……

分糖果问题c语言解法

摘要:解题思路:只要不符合题目要求,就会一直循环注意事项:不要忘记跳出循环参考代码:#include<stdio.h>#define N 1001int main(){ int i,n,k,a[N],c,s……

分糖果(C++代码)简洁明了

摘要:解题思路:上代码注意事项:参考代码:#include<iostream> #include <vector> using namespace std; bool isequal(vector<i……

Java实现正则问题

摘要: import java.util.*; import java.math.*; public class Main { static char[] arr; stati……