题解列表
1058: 二级C语言-求偶数和(很简单的东西)
摘要: #include
int main()
{
int n;
int sum=0;
int a[100]; //通过……
优质题解
【C语言】尼科彻斯定理:利用等差数列算出首项 - DotcppXF
摘要:【解题思路】 ① 找出连续奇数的规律,算出首项即可解题。【1】连续的奇数就是一个公差为2的等差数列 ① 假设 x 为这个连续奇数的首项,则 m 个连续奇数可表示如下: ……
数字黑洞(Java)
摘要:解题思路:注意事项:参考代码:import java.util.Arrays;import java.util.Scanner;public class Main{ public static voi……
python 完成了75%的小伙伴可以看一下
摘要:解题思路:深度递归注意事项:如果完成了75%并出现运行错误,可能是因为数组越界参考代码:m, n = map(int, input().strip().split())figure = []#存储输入……
1037-宏定义的练习 语言:C++
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define REM(x,y) t=x%yint main(){ int a,b,t; ci……
1036-带参数宏定义练习 语言:C++
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define SWAP(x,y) {int t=x;x=y;y=t;} int main()……
1035-自定义函数之字符类型统计 语言:C++
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;void count(string s){ int a=0,……
另一种思路来解决数字后移
摘要:解题思路:通过将数组复制到此数组后,打印对应位来解决注意事项:注意打印循环i的起始值,否则会写成数字前移。参考代码:#include <stdio.h>int main(){ int x, n;……
1034-自定义函数之数字分离 语言:C++
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;void sep(int n){ string s=to_s……