Zhitong
Zhitong
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Zhitong的博客
全部文章
(共9篇)
题解 | 小红的优惠券
n, m = map(int, input().split()) my_dict = {} for j in range(m): aj, bj = map(int, input().split()) my_dict[aj] = bj bjs = [bj for aj, bj in ...
2025-07-31
0
20
题解 | 【模板】排序
n=int(input()) s=list(map(int,input().split())) s.sort() print(' '.join(map(str, s)))
2025-07-31
0
24
题解 | 多项式输出
n = int(input()) a = list(map(int, input().split())) def get_poly(i): # 处理系数部分 coeff = a[len(a)-1-i] if coeff == 0: return None ...
2025-07-30
0
25
题解 | 乒乓球
s = input() def Win(s, win_score): w = 0 l = 0 for i in range(len(s)): if s[i] == "W": w += 1 elif ...
2025-07-30
0
20
题解 | 计算一年中的第几天
import datetime year, month, day = map(int, input().split()) delta = datetime.datetime(year, month, day) - datetime.datetime(year - 1, 12, 31) print(...
2025-07-29
0
26
题解 | 数颜色
S = input().upper() num_r = 0 num_g = 0 num_b = 0 for i in S: if i == "R": num_r += 1 if i == "G": num_g +...
2025-07-28
0
24
题解 | 田忌赛马
# 读取输入 q = list(map(int, input().split())) t = list(map(int, input().split())) # 对两者的马匹速度进行排序 q.sort() t.sort() if t[0]<q[0]: if t[1]>q[0]...
2025-07-26
0
25
题解 | 买橘子
n=int(input()) original_list=[] for x in range(n//6+1): for y in range(n//8+1): if n==6*x+8*y: original_list.append(x+y) ...
2025-07-26
0
28
题解 | 小红的正整数构造
import random l,r,x=map(int,input().split()) count_y=0 Y=[] for y in range(l,r+1): if y % x == 0: count_y+=1 Y.append(y) if count...
2025-07-26
0
26