题解列表

筛选

1062最大公约与最小公倍

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gongyueshu(int m,int n){ if(m>n) { for(int i=n;i>=1;i--) { ……

无聊的星期六

摘要:size=int(input()) num=list(map(int,(input().split()))) num.sort() print(",".join(str(i) for i in ……

1063统计字符

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char a[100]; gets(a)……

无聊的星期六

摘要:#include<stdio.h>  #include<stdlib.h> #include<string.h> typedef struct{ long name; float che……

1064阶乘数列

摘要:解题思路:注意事项:参考代码:#includeint main(){    double sum=1;    double a=1;    for(int i=2;i<=30;i++)    {   ……

2042: 杨辉三角

摘要:解题思路:注意事项:注意const int N=1e3+5不是1e3如果是1e3会数据越界参考代码:#include <bits/stdc++.h>using namespace std;typede……

2042: 杨辉三角

摘要:解题思路:杨辉三角形满足完全平方公式((a+b)²=a²+2ab+b²)可以根据这个公式写程序注意事项:开数组时多开一些,防止越界参考代码:#include <bits/stdc++.h>//万能头文……

1065最小绝对值(abs的使用)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h> int main(){    int a[10];    int b[10];    for(int ……

1066自定义函数(pow的使用)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>double fenzi(double x,int n){ return pow(x,n);}long ……