2191: Little Xie's issue(python代码) 摘要:解题思路:注意事项:参考代码:n = input() print('*'*(len(n)+4)) print('* '+n+' *') print…… 题解列表 2022年01月24日 0 点赞 0 评论 262 浏览 评分:0.0
python-矩阵加法 摘要:解题思路:注意事项:注意题目要求最后一行不要有多余空格参考代码:def f(n,m): A = [[int(j) for j in input().strip().split()] fo…… 题解列表 2022年01月24日 0 点赞 0 评论 326 浏览 评分:0.0
2190: Little Ke's problem 摘要:解题思路:注意事项:参考代码:n = input() print(f"What is your name? Hello {n}, nice to meet you.")…… 题解列表 2022年01月24日 0 点赞 0 评论 256 浏览 评分:0.0
2189: diamond(python代码) 摘要:解题思路:注意事项:参考代码:n = int(input()) m = 1 for i in range(n//2): print(' '*((n-m)//2)+'…… 题解列表 2022年01月24日 0 点赞 0 评论 220 浏览 评分:0.0
python-新生舞会 摘要:解题思路:开始想的是用对象解决,但是查询遍历的时间复杂度将达到O(n2),想想便放弃了,然后采用字典的方法,时间复杂度为O(n)。建立两个字典第一个字典键值为名字,值为性别第二个字典键值为学号,值为性…… 题解列表 2022年01月24日 0 点赞 0 评论 266 浏览 评分:0.0
1157: 亲和数 摘要:```python m=int(input()) l=[] k=[] for i in range(m): a,b=map(int,input().split()) for…… 题解列表 2022年01月24日 0 点赞 0 评论 337 浏览 评分:7.0
python-整数平均值 摘要:解题思路:貌似没有python的题解,加一下哈。注意事项:注意计算后的结果要取整。参考代码:def f(n): A = [int(i) for i in input().strip().…… 题解列表 2022年01月24日 0 点赞 0 评论 356 浏览 评分:0.0
python-传球游戏 摘要:解题思路:开始我以为是一个递归的题目,写出程序之后数据较大的话时间就会超时。后来参考了别人的答案之后发现是用动态规划的算法。一楼楼主写的题解很好,大家可以去看看。这里也简单写以下思路吧首先建立一个(m…… 题解列表 2022年01月24日 0 点赞 0 评论 502 浏览 评分:9.9
快排 python 一点感悟 摘要:解题思路:左右互换的不知道为什么一直bug,换了个思路,替换得方法注意事项:参考代码:n=int(input())nums=list(map(int,input().split()))def quic…… 题解列表 2022年01月23日 0 点赞 0 评论 241 浏览 评分:0.0
编写题解 2095: 通分(python代码) 摘要:解题思路:简单求解就是了,很方便注意事项:参考代码:a,b,c,d = map(int,input().split()) print(a*d+b*c)…… 题解列表 2022年01月23日 0 点赞 0 评论 583 浏览 评分:4.7