喜欢疯狂星期四的傻狍子不愿再收感谢信
喜欢疯狂星期四的傻狍子不愿再收感谢信
全部文章
分类
归档
标签
去牛客网
登录
/
注册
喜欢疯狂星期四的傻狍子不愿再收感谢信的博客
全部文章
(共38篇)
题解 | 将真分数分解为埃及分数
import math def decompose_egyptian(a, b): res = [] # 约分原始分数 g = math.gcd(a, b) num = a // g den = b // g while num != 0: ...
2025-10-24
0
9
题解 | 仰望水面的歪
from math import gcd import sys n, h = map(int, input().split()) for line in sys.stdin: x, y, z = map(int, line.split()) # 镜像法计算方向向量的z坐标 ...
2025-10-24
0
9
题解 | 支付宝消费打折
n, k = map(int, input().split()) n_list = list(map(int, input().split())) p_list = list(input().strip()) # 确保p_list长度正确 # 处理价格(转成分,优惠逻辑修正) for i in ...
2025-10-24
0
13
题解 | 小苯送礼物
n, k = map(int, input().split()) fans = [] for i in range(n): x, y = map(int, input().split()) support = x + 2 * y # 计算支持力度:点赞x*1 + 收藏y*2 ...
2025-10-24
0
10
题解 | 不要三句号的歪
import sys l = sys.stdin.read().strip().split(',') a = int(l[1]) b = int(l[-1]) y = b-a-1 print(y)
2025-10-23
0
12
题解 | 简单错误记录
import sys x = sys.stdin.read().strip().split('\n') res = {} for i in x: name = i.split(' ')[0] name = name.split('\\')[-1] name = name[-...
2025-10-17
0
18
题解 | 识别有效的IP地址和掩码并进行分类统计
import sys def is_valid_ip(ip_parts): """检查IP地址是否合法""" if len(ip_parts) != 4: return False for par...
2025-10-16
0
15
题解 | 识别有效的IP地址和掩码并进行分类统计
import sys a,b,c,d,e,f,g = 0,0,0,0,0,0,0 z = sys.stdin.read().strip().split('\n') for y in z: try: h,i= y.split('~') j,k,l,m = h....
2025-10-16
0
13
题解 | 坐标移动
import sys s = [i for i in sys.stdin.readline().strip().split(";")] x,y=0,0 for i in s: try : n = i[0] m = int(i[1:]) ...
2025-10-15
0
14
题解 | 购物单
import sys def main(): # 1. 读取预算n和物品数m,预算÷10简化计算 n, m = map(int, sys.stdin.readline().split()) n //= 10 # 简化后预算单位:10元/单位 # 存储主件及对应...
2025-10-15
0
14
首页
上一页
1
2
3
4
下一页
末页