鹿沉
鹿沉
全部文章
分类
归档
标签
去牛客网
登录
/
注册
鹿沉的博客
全部文章
(共43篇)
题解 | 学生综合评估系统
class Student: def __init__(self, student_id, academic_score, activity_score): self.id = student_id self.academic_score = academic...
2025-06-21
0
14
题解 | 最厉害的学生
n = int(input()) lines = [input().strip().split(' ') for _ in range(n)] lines.sort(key=lambda i: sum(map(int, i[1::])), reverse=True) print(' '.join(l...
2025-06-21
0
10
题解 | 凯撒解密
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # 进行凯撒解密 # @param password string字符串 旺仔哥哥的密码 # @param n int整型 每个字符加密过程中错位的次数 # @return string字符串 # class So...
2025-06-21
0
10
题解 | a 加 b 问题(函数)
class Solution: def addTwoInteger(self , Integer1: int, Integer2: int) -> int: result = Integer1 + Integer2 return result
2025-06-21
0
11
题解 | 字符串操作
n, m = map(int, input().split(' ')) s = input() for i in range(m): line = input().split() l, r, c1, c2 = int(line[0]) - 1, int(line[1]), line[...
2025-06-21
0
7
题解 | 添加逗号
n = input()[::-1] cur, newn = 1, '' for i in n: newn += i if cur == 3 and i != n[-1]: newn += ',' cur = 0 cur += 1 print(n...
2025-06-21
0
9
题解 | 牛牛的考试
def exam(): cis = [input().strip() for _ in range(4)] cis = sorted(cis, key=len, reverse=False) # 按答案长度从短到长排序 if len(cis[0]) != len(cis[1]...
2025-06-21
0
8
题解 | 简写单词
summ = input().split(' ') res = '' for i in summ: res += i[0] print(res.upper())
2025-06-20
0
10
题解 | 无限长正整数排列字符串
n = int(input()) res = '' for i in range(1, n + 1): res += str(i) print(res[n-1])
2025-06-20
0
13
题解 | 凯撒加密
n = int(input()) res = 'abcdefghijklmnopqrstuvwxyz' * (n + 1) s = input() result = '' for i in s: j = res.index(i) result += res[j + n] print(...
2025-06-19
0
10
首页
上一页
1
2
3
4
5
下一页
末页