编写题解 2762: 计算(a+b)*c的值 摘要:解题思路:wu注意事项:wu,超级简单参考代码:a,b,c=map(int,input().split())print((a+b)*c)…… 题解列表 2024年02月23日 0 点赞 0 评论 591 浏览 评分:0.0
编写题解 1577: 蓝桥杯算法提高VIP-铺地毯 摘要:解题思路:注意事项:参考代码:n = int(input())rugs = []result = []for j in range(n): a, b, g, k = map(int, input…… 题解列表 2024年02月22日 0 点赞 0 评论 140 浏览 评分:0.0
编写题解 2761: Hello, World!的大小 摘要: s="Hello, World!" print(len(s)+1) #原题为C语言题目,故结果+1,系统才会判定正确 原题为C语言题目,故结果+1,系统才会判定正确…… 题解列表 2024年02月22日 0 点赞 0 评论 491 浏览 评分:9.9
编写题解 2760: 整型与布尔型的转换 摘要:代码: a=int(input()) b=bool(a) a=int(b) print(a) 注意:`bool`是`int`子类,故正常的创建与删除方式 **不…… 题解列表 2024年02月22日 0 点赞 0 评论 295 浏览 评分:9.9
通过列表高效解决母牛递归问题 摘要:解题思路:while True + break解决多行输入问题,列表存储解决超时问题,my_list[ ]存储每一年的母牛数注意事项: 当且仅当n>before_max(历史最大输入)时,才允许…… 题解列表 2024年02月21日 0 点赞 0 评论 188 浏览 评分:7.0
连续出现的字符 摘要:k = int(input()) s = input() for i in range(len(s) - k + 1): window = s[i:i+k] if len(…… 题解列表 2024年02月21日 0 点赞 1 评论 199 浏览 评分:9.9
最长最短单词 摘要:解题思路:注意事项:参考代码:sentence = input().split() # 分割输入的句子为单词列表longest_word = max(sentence, key=len) # 找到…… 题解列表 2024年02月21日 0 点赞 2 评论 272 浏览 评分:9.9
编写题解 1762: printf基础练习 摘要:解题思路:注意事项:这道题年代较长,如今的python3.8.6需要print('0o%o 0x%x'%(n,n))参考代码:n=123456789print('0%o 0x%…… 题解列表 2024年02月21日 0 点赞 0 评论 536 浏览 评分:9.9
数组替换:纯纯文字游戏 摘要:解题思路:切片就能写出来,问题是题目中说到“数组a中只需改变n个元素”,也就是说当m1+n1<m的时候第一个数组中剩下的元素也要加上不能去掉跟你玩文字游戏参考代码:a,b=map(int,input(…… 题解列表 2024年02月21日 0 点赞 0 评论 213 浏览 评分:9.9
用Python写真的太简单了!!! 摘要:```python list_1 = input() list_2 = [] i = 1 j = 1 if list_1[0] == '1': list_2.append('1')…… 题解列表 2024年02月20日 1 点赞 0 评论 184 浏览 评分:9.9