题解列表

筛选

完数的判断(不用数组,for循环即可)

解题思路:先判断要求范围内的完数。在判断的过程中,如果是完数,按格式打印一下这个数,然后找到该完数的每一个因子(除去本身)并按格式打印每一个因子;如果不是完数,就继续判断下一个数。注意事项:1.按格式的打印输出要有一个变量值来辅助处理换行2.打印输出要注意空格参考代码:#include

编写题解 2835: 计算书费

解题思路:注意事项:参考代码:price=(28.9,32.7,45.6,78,35,86.2,27.8,43,56,65)quantity=tuple(map(int,input().split()))price_sum=0foriinrange(len(price)):price_sum+=pri

用栈解决这个问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>#define maxsize 101typedef struct{……

1865: 换硬币

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int func(int n) {……

1864: 数日子

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int main() {    ……

1859: 与2无关的数

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; bool func(int i); ……

1856: 最小三个数

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int n;     int arr[100]……