莫燿汶
莫燿汶
全部文章
分类
题解(62)
归档
标签
去牛客网
登录
/
注册
莫燿汶的博客
第一语言python的小白
全部文章
(共62篇)
题解 | #最长连续登录天数#
select user_id,max(cgep) max_consec_days from ( -- count()+1是因为最初始的一条记录是连续两天登录 select user_id,count(label) + 1 cgep,diff from ( select a.user_id,a.fda...
2024-11-20
0
8
题解 | #统计每个学校各难度的用户平均刷题数#
SELECT up.university university, qd.difficult_level difficult_level, CO...
2022-10-21
0
269
题解 | #牛牛的矩阵相加#
lis = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] num = int(input()) lis = list(map(lambda x: list(map(lambda i: i * num, x)), lis)) print(lis)嵌了两层map......
Python3
2022-08-16
3
404
题解 | #格式化清单#
food = ["apple", "ice cream", "watermelon", "chips", "hotdogs", "hotpot"] while food: ...
Python3
2022-08-16
0
280
题解 | #列表的最大与最小#
lis = [x for x in range(10, 51)] print(lis) print(lis[0], lis[-1], sep=" ")列表生成式底层调用的是c,理论上比for循环会快很多
Python3
2022-08-16
0
304
题解 | #验证登录名与密码#
admin = {"admis": "Nowcoder666"} name = input() password = input() if admin.get(name) == password: &...
Python3
2022-08-16
0
272
题解 | #判断布尔值#
bool1 = int(input()) if bool1: print("Hello World!") if not bool1: print("Erros!") 在python中将返回值为大于0的值判断...
Python3
2022-08-15
4
457
题解 | #牛牛的替换#
st = input()[2::].split() rep = input() a = 0 for i in range(2): rep = rep.replace(st[a],st[a+1]) a += 2 print(rep)
Python3
2022-05-20
0
318
题解 | #记票统计#
import sys mamber, name, pepple, votes = [line.replace("\n", "").split() for line in sys.stdin] a = 0 for i in name: answer = votes.count(i) ...
Python3
2022-05-06
0
366
题解 | #[NOIP2010]数字统计#
L, R = map(int, input().split()) lis = [] for i in range(L, R + 1): lis += list(str(i)) print(lis.count("2"))
Python3
2022-05-03
0
330
首页
上一页
1
2
3
4
5
6
7
下一页
末页