电池的寿命 思路:对于有1个3,1个5的情况和3,5各有奇数个的情况没得说,对于其他情况把电池当作水即可求得。参考代码为初始未优化代码,大家可以自己更近一步修改。参考代码:```c#includeintmain(){intN;while(scanf("%d", 题解列表 2023年01月12日 0 点赞 0 评论 996 浏览 评分:7.3
题目 1511: 蓝桥杯算法提高VIP-复数求和 摘要:解题思路:从键盘读入n个复数(实部和虚部都为整数)用链表存储,遍历链表求出n个复数的和并输出。注意事项:参考代码:#include<stdio.h>#include<stdlib.h>typedef …… 题解列表 2023年01月12日 0 点赞 0 评论 518 浏览 评分:0.0
奇偶数判断(C语言) 摘要:解题思路:从文章的‘输出格式’可以知道:如果输入的数是奇数,就输出odd,如果是偶数就输出even。一个大于0的正整数,非偶即奇。一个数除以2,没有余数的就是偶数,有余数的就是奇数。注意事项:1.输入…… 题解列表 2023年01月12日 0 点赞 0 评论 878 浏览 评分:6.0
A+B for Input-Output Practice (V)(水题) 摘要:```c #include int main(){ int n,m,i,j,a[1000],sum=0; scanf("%d",&n); for(i=0;i…… 题解列表 2023年01月12日 0 点赞 0 评论 820 浏览 评分:9.9
判断闰年(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x; scanf("%d",&x); if(x%4==0 && x%100!=0…… 题解列表 2023年01月12日 0 点赞 0 评论 497 浏览 评分:0.0
判断闰年(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x; scanf("%d",&x); if(x%4==0 && x%100!=0…… 题解列表 2023年01月12日 0 点赞 0 评论 530 浏览 评分:0.0
编写题解 2917: 奇数单增序列 摘要:解题思路://给定一个长度为N(不大于500)的正整数序列,请将其中的所有奇数取出,并按升序输出。 #include <stdio.h> void sort(int arr[], int sz);…… 题解列表 2023年01月12日 0 点赞 0 评论 545 浏览 评分:0.0
新手都能看懂的链表合并 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,m; scanf("%d%d",&n,&m); int a[n+m][2]; …… 题解列表 2023年01月12日 0 点赞 0 评论 470 浏览 评分:0.0
收费(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double x,s; scanf("%lf",&x); if(x<=20) {…… 题解列表 2023年01月12日 0 点赞 0 评论 471 浏览 评分:0.0
水题计算空格数即可 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N = …… 题解列表 2023年01月12日 0 点赞 0 评论 503 浏览 评分:0.0