题解列表

筛选

1017-完数的判断 语言:C++

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){   int n;   cin >>n;   for(int i=2;i……

1016-水仙花数判断 语言:C++

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){        int a,b,c=3; ……

1015-求和训练

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;typedef long long LL;LL sum(int a){ LL res=0; f……

汽水瓶(java)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {……

1022-筛选N以内的素数 语言:C++

摘要:解题思路:注意事项:参考代码:/*素数的特点:1) 因数只包含1和自己2) 1不是素数 表达式:1) 运算符+数据 或 数据2) break语句不是表达式,所以break语句不能作为逗号表达式中的一个……

1023-选择排序 语言:C++

摘要:解题思路:注意事项:参考代码:/*从小到大选择排序:每一次从待排序数列中找出最小的数。 */#include<iostream>using namespace std;int main(){ int ……

筛选n以内的素数,并且输出结果

摘要:解题思路:先判断两个数字能不能相互整除,如果能整除那就再次判断相不相等;然后再输出结果注意事项:参考代码#include<stdio.h>int main(){    int i = 2;    in……