题解列表

筛选

看看#define是多么强大的存在

摘要:解题思路:1、题目要求输出一个自然数,所以找到一个就可以结束程序。2、由于题目给出的条件很多,为了方便修改和维护,所以想到了#define注意事项:1、使用#define要做到勤用括号(),多用括号代……

计算1~N之间所有奇数之和

摘要:解题思路:从1到N判断每一个数如果为奇数,累加如果为偶数,跳过参考代码:#include"iostream" using namespace std; int ans = 0; bool che……

自由下落的距离计算

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    double M,a,c,d;    double b=0;    int N;    scanf("%l……

数据结构单链表的使用

摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include<stdlib.h>typedef int Elemtype;typedef struct LNode //结构定义{……

DNA-一种题解

摘要:参考代码:public void dna() {     Scanner sc = new Scanner(System.in);     int n = sc.nextInt();     f……

编写题解 1979: 求平均工资

摘要:解题思路:编辑数组先求和再求平均值注意事项:参考代码:#include <stdio.h>int main(){ int n,i,j,b=0,c;  scanf("%d",&n); int a[n];……