python 巧用字典get方法 摘要:解题思路:注意事项:参考代码:s=input()d=dict()a=[]for i in range (len(s)): d[s[i]]=d.get(s[i],0)+1for i in rang…… 题解列表 2023年03月15日 0 点赞 0 评论 388 浏览 评分:9.9
自定义函数之字符提取 摘要:解题思路:见代码注意事项:在字符串为'\n'时候提前结束循环,因为有半段有的编译器不会设置这段为'\0'而是乱码,需要提前结束循环。参考代码:#include<stdi…… 题解列表 2023年03月15日 0 点赞 0 评论 304 浏览 评分:0.0
字符串对比 摘要:解题思路:# 输入两个字符串 str1 = input() str2 = input() # 先比较两个字符串长度,如果长度不同,返回1 # 如果长度相同,再比较两个字符串是否相等,如果相等,…… 题解列表 2023年03月15日 0 点赞 0 评论 311 浏览 评分:9.9
将数字时间打印成英文输出 摘要:解题思路: 简单的判断语句,字典查询操作。 # 代码太冗长,适合初学者 d = {0: 'zero', 1: 'one', 2: 'two', …… 题解列表 2023年03月15日 0 点赞 0 评论 325 浏览 评分:0.0
循环入门练习6 摘要:解题思路:注意事项:参考代import java.util.Scanner;public class x6 {public static void main(String[]args) {Scanne…… 题解列表 2023年03月15日 0 点赞 0 评论 349 浏览 评分:9.9
来一手冒泡练习 摘要:解题思路:注意事项:参考代码:#include <stdio.h>struct Student { int id; float score;};int main(){ int n,m; scanf("…… 题解列表 2023年03月15日 0 点赞 0 评论 502 浏览 评分:9.9
答疑(自定义排序) 摘要:解题思路:注意事项:参考代码:n=int(input())t=[]sum=[]count=0d=0for i in range(n): t.append(list(map(int,input()…… 题解列表 2023年03月15日 0 点赞 0 评论 359 浏览 评分:0.0
寻找矩阵最值——输出矩阵的最大值以及其位置 摘要:解题思路:注意事项:参考代码:n = int(input())L1 = []L2 = []for i in range(n): L = list(map(int,input().split())…… 题解列表 2023年03月15日 0 点赞 0 评论 321 浏览 评分:0.0
1821-拼接平方数-JAVA最详细图解+流程图 摘要:解题思路:以169为例,将此数进行拆解,如下图所示:这个过程可理解为一把刀在整数每一位从左到右平移,每次平移都把该数分解为两部分。※ 在用java解此题的时候,最方便的做法是将这个整数当作字符串处理,…… 题解列表 2023年03月15日 0 点赞 0 评论 460 浏览 评分:9.9
编写题解 1458: 蓝桥杯2013年第四届真题-错误票据 摘要: #include #include #include #include #include #include #include …… 题解列表 2023年03月15日 0 点赞 0 评论 219 浏览 评分:0.0