计算浮点数相除的余数 摘要:解题思路:注意事项:参考代码:num1,num2 = map(float,input().split())print('%g'%(num1%num2))…… 题解列表 2024年12月26日 0 点赞 0 评论 221 浏览 评分:0.0
Python方法求根 摘要:参考代码:from math import * a,b,c=map(int,input().split()) m=b**2-4*a*c if m>=0: n=sqrt(m) …… 题解列表 2024年12月26日 1 点赞 0 评论 310 浏览 评分:0.0
2911: 连续出现的字符 摘要:解题思路:用 itertools.groupby 来查找字符串中连续出现的字符就好啦注意事项:参考代码:from itertools import groupbyk=int(input())s=inp…… 题解列表 2024年12月22日 0 点赞 0 评论 229 浏览 评分:10.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:两个恰好有一个,联想到异或门,当两变量不同时为一,相同时为零注意事项:参考代码:a,b=map(int,input().strip().split())if (a>=60)^(b>=60)=…… 题解列表 2024年12月22日 0 点赞 0 评论 156 浏览 评分:0.0
1866: 三位数反转 摘要:解题思路:这题有多行输入,可能会造成错误注意事项:参考代码:while True: try: a = list(input()) b = a[::-1] …… 题解列表 2024年12月21日 0 点赞 0 评论 216 浏览 评分:0.0
计算球体积 摘要:解题思路:注意事项:参考代码:import mathpi=math.pi //导入库while True: &n 题解列表 2024年12月21日 1 点赞 0 评论 426 浏览 评分:0.0
Python.六行解决最大公约数和最小公倍数 摘要:解题思路:利用倒序,直接找到最大公倍数,最小公约数=两数相乘/最大公约数注意事项:利用break可以大大缩短运行时间参考代码:a,b=map(int,input().split()) m=max(a…… 题解列表 2024年12月20日 2 点赞 0 评论 387 浏览 评分:10.0
编写题解 2768: 与圆相关的计算 摘要:解题思路:注意事项:参考代码:r = float(input())pi = 3.14159print('%.4f' % (2 * r), end=' ')print(&…… 题解列表 2024年12月20日 0 点赞 0 评论 291 浏览 评分:0.0
编写题解 1005: [编程入门]温度转换 摘要:解题思路:注意事项:参考代码:f = float(input())print('c=%.2f' % (5 * (f - 32) / 9))…… 题解列表 2024年12月20日 2 点赞 0 评论 1659 浏览 评分:0.0
python,基础运算 摘要:解题思路:注意事项:参考代码:nums = list(map(float, input().strip().split()))x, a, b, c, d = numsfx = a * x ** 3 +…… 题解列表 2024年12月20日 0 点赞 0 评论 171 浏览 评分:0.0