题解 1149: C语言训练-计算1~N之间所有奇数之和 摘要:解题思路:注意事项:计算奇数时需要包括1和n本身参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); …… 题解列表 2022年03月03日 0 点赞 0 评论 554 浏览 评分: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 评论 503 浏览 评分: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 评论 324 浏览 评分:0.0
字符类型统计-傻瓜做法 摘要:解题思路:如果忘记了alpha、dight、space这几个单词的情况下可以用这个方法......注意事项:注意字母是会有大写小写两种状态的参考代码:inp = input()A = 0B = 0C …… 题解列表 2022年03月03日 0 点赞 0 评论 423 浏览 评分: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 评论 468 浏览 评分:0.0
简单便捷解决美国大学 摘要:解题思路:1.输入州数 2.while循环判断是否州数为0,为0则退出 3.若不为0,则输入州的选票数 4.要求最少票数,则列表排序,取得前一半+1的州的认可(就需要取得这一半多州的票的一半+1) 5…… 题解列表 2022年03月03日 0 点赞 0 评论 811 浏览 评分:9.9
全球变暖--新手解法 摘要:解题思路:找到每块大陆,然后判断每块大陆是否能够被淹没,如果大陆周围被大陆包围就不可能被淹没注意事项:参考代码:#include<bits/stdc++.h>using namespace std;c…… 题解列表 2022年03月03日 0 点赞 0 评论 571 浏览 评分:6.0
编写题解 1247: 筛排处理 摘要:解题思路:代码量有些大,但是思路很清晰,先排序,后去重。注意每次k都要从0开始注意事项:参考代码:#include<stdio.h>int main(){ int n,i,j,t,k; int a[1…… 题解列表 2022年03月03日 0 点赞 0 评论 592 浏览 评分:0.0
动态规划十行快速解题 摘要:解题思路:注意事项:参考代码:dp=[0 for i in range(1000000)]count=0a,b=map(int,input().split())dp[a]=dp[b]=1for i i…… 题解列表 2022年03月03日 0 点赞 0 评论 441 浏览 评分:0.0
程序员的表白(加油!无限拉大长板) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char c; int n,i,j; while(scanf("%d",&n)!=EOF) { for(j=0;…… 题解列表 2022年03月03日 0 点赞 0 评论 440 浏览 评分:0.0