GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共162篇)
题解 | 牛牛的考试
def correct(options): # 每个选项的内容 contects = [option.split(".", 1)[1] for option in options] # 每个选项的长度 lengths = [len(contect)...
2025-06-08
1
7
题解 | 简写单词
eng = list(map(str,input().strip().split())) u_eng = [] for i in eng: u_eng.append(i[0].upper()) print("".join(u_eng))
2025-06-08
0
9
题解 | 无限长正整数排列字符串
s = int(input().strip()) def find_pos(s): if s <= 9: return str(s) elif s <= 189: s -= 9 index = (s-1) // 2 ...
2025-06-08
1
7
题解 | 凯撒加密
n = int(input()) s = str(input().strip()) result = [] for char in s: if 'a' <= char <= "z": new_char = chr((ord(char) - ...
2025-06-08
0
8
题解 | 斗兽棋
rules = { "elephant":"tiger", "tiger":"cat", "cat":"mouse", "mouse&qu...
2025-06-08
1
8
题解 | 年轻人不讲5的
s = list(map(str, input().strip())) for i in range(len(s)): if s[i] == '5': s[i] = '*' print("".join(s))
2025-06-07
0
8
题解 | 杨辉三角
n = int(input()) def generate_triangle(n): triangular = [] for i in range(n): # 生成n行均为1的矩阵 row = [1] * (i+1) for j in...
2025-06-07
0
10
题解 | 矩阵转置
n,m = map(int,input().strip().split()) matrix = [list(map(int,input().strip().split())) for _ in range(n)] tran_matrix = [[0]*n for _ in range(m)] ...
2025-06-07
0
9
题解 | 上三角矩阵判定
n = int(input()) matrix = [list(map(int,input().strip().split())) for _ in range(n)] def is_upper_triangular(m,matrix): for i in range(1,n): ...
2025-06-07
0
7
题解 | 单组_二维数组
import sys n,m = map(int,input().strip().split()) total = 0 for line in sys.stdin: li = list(map(int,line.strip().split(" "))) tota...
2025-06-07
0
9
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页