题解列表

筛选

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, i, j; scanf_s("%d", &n); for (i = 0; i < n; i++) ……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){    char str[301];    fgets(str, size……

数据结构-字符串插入

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int i;    int t=0;    int j=0;    c……

辗转相除法

摘要:解题思路:辗转相除法,最小公因数用数学表示为: gcd(a, b) = gcd(b, a mod b)。最大公倍数为两数的积除以最小公因数。注意事项:因为我这里gcd函数的第一个输入值设置为较小的值,……

完数的判断

摘要:#include <stdio.h> int main(){ int sum=1, i=2,y=2,N=0; scanf("%d",&N); for(i;i<=N;i++){ su……

有规律的数列求和

摘要:#include <stdio.h> int main(){ int N=10,i; float x=2.0,y=1.0,z=0.0,sum=2.0; //scanf("%d",&N);……

平均值的计算

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;    public class Main {        public static void main(Strin……

哇靠送分题

摘要:解题思路:注意事项:小小的改一下题目参考代码:#include<iostream>using namespace std;int main(){    int a,b,c;    while(cin>……

哇靠送分题*2

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