题解列表

筛选

1014: [编程入门]阶乘求和

摘要:import java.io.*; /**  * 写一个计算阶乘的方法,再循环求和  * 踩坑:计算的结果有一个大数!用 long 来保存阶乘的结果!  */ public clas……

1017: [编程入门]完数的判断

摘要:思路是从 1 到 n 挨个处理,保存其所有因数(除了自身),最后所有因数和与自身比较,如果相等则为完数。#include<bits/stdc++.h> using namespace std;  ……

1067: 二级C语言-分段函数

摘要:#include<bits/stdc++.h> using namespace std;   int main() {     double x;     cin >> x;     if……

1071: 二级C语言-阶乘公式求值

摘要:注意 fact 函数的返回值类型是 double。(不是 double 的话 100 的测试值无法通过)#include<bits/stdc++.h> using namespace std;  ……

数列排序(C++)

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

最长字符串

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<string.h>int main(){   char n[5][100];    int s=0;    for(……

1066: 二级C语言-自定义函数

摘要:直接使用pow()函数即可解决。#include<bits/stdc++.h> using namespace std; double fact(int &n){     double su……