列表的循环输入,利用列表切片和求和 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) a=a[1:] for i in a: xx=a…… 题解列表 2022年04月06日 0 点赞 0 评论 579 浏览 评分:0.0
注意换行和列表清空 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) a=a[1:] b=sorted(a,reverse=True…… 题解列表 2022年04月06日 0 点赞 0 评论 482 浏览 评分:0.0
模拟双指针 (代码简洁) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>int main(){ int a=0,b=9;/…… 题解列表 2022年04月06日 0 点赞 0 评论 396 浏览 评分:0.0
超简短代码 摘要:解题思路:注意事项:参考代码:while True: a,b=map(int,input().split()) print(a+b) print()…… 题解列表 2022年04月06日 0 点赞 0 评论 454 浏览 评分:0.0
蓝桥杯算法提高VIP-夺宝奇兵(C语言,动态规划) 摘要:思路,动态规划 #include int a[101][101]={0},b[105]={0}; int swap(int a,int b) { …… 题解列表 2022年04月06日 1 点赞 0 评论 463 浏览 评分:0.0
编写题解 1049: [编程入门]结构体之时间设计 摘要:解题思路:先判断平闰年,并用数组列出该年每月天数,遍历前几个月的天数求和后加上输入的几号即为结果。注意事项:参考代码:#include<stdio.h>struct dijitian{ int …… 题解列表 2022年04月06日 0 点赞 0 评论 430 浏览 评分:0.0
C语言--------和最大子序列 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int N,i,sum=0,max=0; scanf("%d",&N); int A[N]; …… 题解列表 2022年04月06日 0 点赞 0 评论 414 浏览 评分:0.0
蓝桥杯2020年第十一届国赛真题-天干地支 摘要:解题思路:把庚子年作为开始年,每过60年一个循环注意事项:正年数与负年数方向不一样(2019 是己亥年 2021是辛丑年)都与2020差一年参考代码:#include <iostream> #inc…… 题解列表 2022年04月06日 0 点赞 0 评论 849 浏览 评分:0.0
题解 1563: 蓝桥杯算法提高VIP-质因数 摘要:````python n = int(input()) x = n s = '' while x > 1: for i in range(2,x+1): if x%…… 题解列表 2022年04月06日 0 点赞 0 评论 388 浏览 评分:0.0
if嵌套解决,思路简单 摘要:解题思路:逐步检查个、十、百、千位,最大数字10000,所以不特别考虑万位注意事项:if判断时要注意判断i/10之后是否为0。例如n=7时,i=7,第一次if判断到7的个位不为0,1,2,9,进入第二…… 题解列表 2022年04月06日 0 点赞 0 评论 796 浏览 评分:0.0