题解列表

筛选

字符串分类统计

摘要:解题思路:数字字符在‘0’-‘9’之间,英文字符在‘a’-‘z’和‘A’-‘Z’之间,空格为‘ ’注意事项:在输入字符的时候用gets(),scanf会把空格当作是连个单词的分隔符参考代码:#incl……

Sn的公式求和

摘要:解题思路:递归注意事项:参考代码:#include <stdio.h> #include <math.h> int fun(int n){  // 使用递归得到每一项数字     if(n==1……

[编程入门]第一个HelloWorld程序

摘要:解题思路:注意事项:1,他们转行了,不是一排的!(相关结尾语————endl;)2,数清楚有多少“*”,否则是错的。3,如果要转行,别把这个“ ”的符号忘了参考代码:#include<iostream……

阶乘求和(递归)

摘要:解题思路:  递归注意事项: 由题可知,n<=20,当n越接近20,其数量及越庞大,求阶乘与求阶乘和时应使用long long int 类型。参考代码:#include <stdio.h> lo……

求和训练(递归)

摘要:解题思路:  递归注意事项: 在求倒数时,将1/c写为1.0/c或者1/(float) c参考代码:#include <stdio.h> // 求1~a的和 int sum_add(int a……

题解 1267: A+B Problem

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

简单的 a + b

摘要: #include using namespace std; int main() { int a, b; while (cin >……

1074: 数字整除

摘要: #include #include using namespace std; int main() { string s; in……