题解列表

筛选

题解 2822: 求分数序列和

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

题解 3011: 余数相同问题

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n=2,a,b,c; cin>>a>>b>>c; w……

[编程入门]完数的判断 (C语言)

摘要:解题思路:在b<a的循环中,将所有被a%b=0的b累加,得到sum,如果sum=a,则证明a为完数。把a输出。然后用b=c,将b重新赋值为1,将b<a,然后a%b=0的步骤重新来一遍,把所有的b的值输……

蛇形矩阵,找规律输出

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){         int n;         scanf("%d",&n);         int temp=……

2782: 整数大小比较

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int x,y;    scanf("%d %d", &x, &y);    if(x>y)    pri……

python编写a+b

摘要:解题思路:用while语句让它一直循环,不然直接打印会只对百分之五十。while语句有始有终,需要用break跳出注意事项:注意代码前面空格的位置参考代码:while True:    try:   ……