字符逆序 (C++代码) 摘要:解题思路: 该题主要是考虑到要算上空格的个数,才是字符串的总长度。注意事项:不能使用scanf()输入,而是要改为gets()的字符串输入格式,然后使用strlen()函数,求其字符串长度。参考代码:…… 题解列表 2019年04月27日 0 点赞 0 评论 860 浏览 评分:0.0
一起来捉妖 (C语言代码) 摘要:解题思路: 循环输入数据,每一次输入就进行判断,不断求和即可。 由于scanf是有返回值的,且返回值为int型,特别的此处用法导致只有scanf返回-1,循环才会结束,也就…… 题解列表 2019年04月27日 2 点赞 0 评论 1351 浏览 评分:0.0
一起来捉妖 (C++代码) 摘要:解题思路: 水一下就过了参考代码:#include<bits/stdc++.h> #define hh ios::sync_with_stdio(false),cin.tie(0),cout.tie…… 题解列表 2019年04月28日 0 点赞 0 评论 775 浏览 评分:0.0
找寻小妖 (C++代码)又一个BFS模板题目 摘要:解题思路: 参考其他的BFS模板题目,此题目类似参考代码:#include<bits/stdc++.h> #define hh ios::sync_with_stdio(false),cin.…… 题解列表 2019年04月28日 0 点赞 0 评论 708 浏览 评分:0.0
找寻小妖 (C语言代码) 摘要:解题思路: 就是bfs,但我就不知道哪里错了,求路过的大神求解注意事项:参考代码:#include<stdio.h>#define max 101char map[max…… 题解列表 2019年04月28日 0 点赞 3 评论 418 浏览 评分:0.0
2005年春浙江省计算机等级考试二级C 编程题(2) (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double ctof(int c){ int f; f = 32 + c * 9 / 5; return f;}in…… 题解列表 2019年04月28日 0 点赞 0 评论 434 浏览 评分:0.0
[编程入门]自定义函数处理最大公约数与最小公倍数 (C语言代码) 摘要:解题思路:if(m%n==0) return n; return fun(n,m%n);是求最大公约数注意事项:最小公倍数等于两个数相乘/最大公约数参考代码:#include<stdio.h>int …… 题解列表 2019年04月28日 0 点赞 0 评论 508 浏览 评分:0.0
[编程入门]宏定义之闰年判断 (C语言代码) 摘要:解题思路:注意事项:首先明确闰年:1、能被4整除,但不能被100整除 2、能被400整除参考代码:#include<stdio.h>#define LEAP_YEAR(y)int…… 题解列表 2019年04月28日 0 点赞 0 评论 591 浏览 评分:0.0
考试评级 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a; scanf("%d",&a); if(80<=a&&a<=100)…… 题解列表 2019年04月28日 0 点赞 0 评论 517 浏览 评分:0.0
数列问题 (C语言代码) 摘要:简单易懂的代码。参考代码:#include<stdio.h>int main(){ int a[35]={3,4,5}; int i,N; scanf("%d",&N); for(i=3;i<N;i+…… 题解列表 2019年04月28日 0 点赞 0 评论 662 浏览 评分:0.0