python_周瑜的反间计 摘要:解题思路:1.按照题意定义列表,用一个while来输入case,并且当输入为-1时结束程序。2.输入询问的次数,for循环输入要查找的文件。 3.用count()函数(或者index()函数,但这里前…… 题解列表 2022年03月03日 0 点赞 0 评论 441 浏览 评分:8.0
宏定义之找最大数 摘要:```cpp #include using namespace std; #define da2(a,b,c) float x1,x2;x1=max(a,b);x2=max(x1,c);cout…… 题解列表 2022年03月03日 0 点赞 0 评论 305 浏览 评分:0.0
题解 1149: C语言训练-计算1~N之间所有奇数之和 摘要:解题思路:注意事项:计算奇数时需要包括1和n本身参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); …… 题解列表 2022年03月03日 0 点赞 0 评论 485 浏览 评分:0.0
题解 1135: C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,n; scanf("%d %d",&a,&n); if(n>=…… 题解列表 2022年03月03日 0 点赞 0 评论 445 浏览 评分:0.0
宏定义之闰年判断 摘要:```cpp #include using namespace std; #define LEAP_YEAR(y) if((y%100!=0&&y%4==0)||y%400==0){cout…… 题解列表 2022年03月03日 0 点赞 0 评论 289 浏览 评分:0.0
字符类型统计-傻瓜做法 摘要:解题思路:如果忘记了alpha、dight、space这几个单词的情况下可以用这个方法......注意事项:注意字母是会有大写小写两种状态的参考代码:inp = input()A = 0B = 0C …… 题解列表 2022年03月03日 0 点赞 0 评论 339 浏览 评分:0.0
用宏定义练习之三角形面积 摘要:```cpp #include using namespace std; #define S(a,b,c) s=(a+b+c)/2.0; #define area(a,b,c,s) q=sqr…… 题解列表 2022年03月03日 0 点赞 0 评论 384 浏览 评分:0.0
简单便捷解决美国大学 摘要:解题思路:1.输入州数 2.while循环判断是否州数为0,为0则退出 3.若不为0,则输入州的选票数 4.要求最少票数,则列表排序,取得前一半+1的州的认可(就需要取得这一半多州的票的一半+1) 5…… 题解列表 2022年03月03日 0 点赞 0 评论 733 浏览 评分:9.9
全球变暖--新手解法 摘要:解题思路:找到每块大陆,然后判断每块大陆是否能够被淹没,如果大陆周围被大陆包围就不可能被淹没注意事项:参考代码:#include<bits/stdc++.h>using namespace std;c…… 题解列表 2022年03月03日 0 点赞 0 评论 497 浏览 评分:6.0
编写题解 1247: 筛排处理 摘要:解题思路:代码量有些大,但是思路很清晰,先排序,后去重。注意每次k都要从0开始注意事项:参考代码:#include<stdio.h>int main(){ int n,i,j,t,k; int a[1…… 题解列表 2022年03月03日 0 点赞 0 评论 529 浏览 评分:0.0