题解列表

筛选

题解 2824: 求出e的值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double n,e=1,num=0;    cin……

C语言-计算2的幂

摘要:解题思路:循环结构,n个2相乘注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){    int n,s=1;    scanf("%d",&……

平方差C++最快算法

摘要:解题思路:找规律,总数-能被2整除且不能被4整除的数=平方差数注意事项:参考代码:#include<iostream> using namespace std; int main() ……

计算线段长度C语言

摘要:解题思路:勾股定理注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){    double xa,ya,xb,yb;    scanf("%l……

数字的处理与判断

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n ,count = 0 ,i = 0 , a[5]……

枚举测试法求最大公约数与最小公倍数

解题思路:用循环枚举逐一测试是否满足最大公约数的条件与最小公倍数的条件注意事项:最大公约数从最小的公约数1开始,往上递增到其中一个数,最小公倍数从最大的公倍数m*n开始,向下递减至其中一个数。参考代码:#includeintmain(){intm,

不用指针,简单写法

摘要:解题思路:一看就懂!注意事项:参考代码:#include <stdio.h>int main(){ int a, b; int c = 0; scanf_s("%d %d", &a, &b); c =……