题解列表

筛选

c++循环解法

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring>using namespace std;int main(){ int n=0,sum=0,s=0……

10行搞定(c++代码)超易懂

摘要:解题思路:列举样例的情况不难发现,靠左边的树苗离右边的长度决定了它的最高度,同理,靠右的树苗离左边界的距离决定了它的高度,这样看来这个题目就简单多了       第一天                ……

C语言训练-数字母

**思路:**如果参数是字母,`isalpha`函数返回true。`isalpha`函数原型在`cctype`中。`'\0'`是字符串的结尾**代码:**```c++#include#includeusingnamespacestd;intmain(){chara[100];inti=0,

c++字符串简单解法

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm>using namespace std;int main(){ int n,m; string……

1869: 鸡兔同笼(多组输入)

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

1872: 春夏秋冬季节判断

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

floyd算法,代码简介明了

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm>using namespace std;const int N……
优质题解

N以内累加求和(c++代码)

这道题是我们在学习for循环(**1**),while循环(**2**),包括函数(**3**)的学习过程中都会遇到的一道经典题目,所以我们介绍下面的**五**种方法。至于第四,五种方法我们卖个关子,最后讲解。**1.for循环累加**将输入的数字N循环逐次减1,