Python同一行的不同输入,注意500的整数倍 摘要:解题思路:用split()进行:先读取整行,然后按空格(或其他分隔符)拆分,再分别处理。注意事项:当重量g-1000后是500的整数倍时(//)不会向下取整,也不用+1参考代码:a=input().s…… 题解列表 2026年04月22日 0 点赞 0 评论 66 浏览 评分:0.0
Py2791-计算邮资 摘要:参考代码:importmathn,j=input().split()n=int(n)num=…… 题解列表 2025年11月06日 0 点赞 0 评论 236 浏览 评分:0.0
python方法解决 摘要:解题思路:注意事项:参考代码:import mathl = input().split()s = 0if l[1] == 'y': s = 5a = int(l[0])if a …… 题解列表 2024年07月28日 0 点赞 0 评论 797 浏览 评分:0.0
编写题解 2791: 计算邮资python 摘要:参考代码:r, s = input().split() r = int(r) money = 8 if r > 1000: money += (r-1000)//500*4 …… 题解列表 2024年03月06日 0 点赞 0 评论 582 浏览 评分:10.0
计算邮资python版 摘要:解题思路:注意事项:参考代码:import mathwhile True: try: base = 8 t, q = input().strip().split() …… 题解列表 2024年02月03日 0 点赞 0 评论 511 浏览 评分:9.9
2791: 计算邮资 摘要:解题思路:注意事项:参考代码:a, b = input().strip().split()a = int(a) ; b = str(b) # 这里的b转换类型只是为了增加程序可读性,可以不用转换…… 题解列表 2022年12月04日 0 点赞 0 评论 659 浏览 评分:8.0