题解列表
二进制分类(C语言)
摘要:解题思路:暴力(笑注意事项:数据范围是从1到1000(包括1和1000),并不需要自己输入。参考代码:#include<stdio.h>int main(){ int i, s, A = 0, B =……
编写题解 2819: 数字反转
摘要:解题思路:注意事项:参考代码:#includeusing namespace std;int main(){ int n,m=0; cin>>n; while(n){ m=m*10+n%10;//每……
2778: 判断数正负
摘要:解题思路: while循环控制输入 if条件判断控制范围注意事项:参考代码:while 1: a = int(input()) if a <= -1E9 or a >= 1E9: #……
2779: 输出绝对值
摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0: print('{:.2f}'.format(a)) #第一……
2786: 判断能否被3、5、7整除
摘要:解题思路:不用循环,只用条件判断语句注意事项:参考代码:a = int(input())if a % 3 == 0 and a % 5 == 0 and a % 7 == 0: print(&#……
很简单的一种思路,可以不用到数组
摘要:```c
//思路是先把A的因子和算出来得出B,然后判断B的因子和是否等于A,是则是亲密数
#include
int main()
{
for(int a=2;a……
编写题解 1954: 话费计算
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
int main()
{
int a;
double sum = 0;
scanf("%d",&a)……
与指定数字相同的数的个数
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m,i,b=0; int a[100]; scanf("%d%d",&……