题解列表

筛选

A+B for Input-Output Practice (II)

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

python编写题解 2773: 计算线段长度

摘要:解题思路:两点间距离公式注意事项:测试数据都是一组,不是两组。参考代码:from math import sqrt number = input().split() if len(number) ……

A+B for Input-Output Practice (I)

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

与运算完成三角形判断

摘要:解题思路:            三条线段能组成三角形的条件:            ①两边之和大于第三边            ②两边之差小于

用筛法求之N内的素数

摘要:解题思路:筛法就是把数据按从小到大的顺序排列,找到第一个素数,再筛选掉数据内所有与此数有关的数,完成之后再找下一个素数,再次筛选,以此类推注意事项:参考代码:#include<iostream>usi……

不用多余变量完成

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>void dg(int n, char* arr){    if (n - strlen(arr……

利用类型转换解Hello, world!

摘要:解题思路:利用char,把int类型转换为char类型即可注意事项:参考代码:#include<iostream>using namespace std;int main(){int a = 0;wh……

DFS(深度优先遍历)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> #include<vector> using namespace std; int flag=0; class……