题解列表
Python.六行解决最大公约数和最小公倍数
摘要:解题思路:利用倒序,直接找到最大公倍数,最小公约数=两数相乘/最大公约数注意事项:利用break可以大大缩短运行时间参考代码:a,b=map(int,input().split())
m=max(a……
编写题解 2768: 与圆相关的计算
摘要:解题思路:注意事项:参考代码:r = float(input())pi = 3.14159print('%.4f' % (2 * r), end=' ')print(&……
编写题解 1005: [编程入门]温度转换
摘要:解题思路:注意事项:参考代码:f = float(input())print('c=%.2f' % (5 * (f - 32) / 9))……
python,基础运算
摘要:解题思路:注意事项:参考代码:nums = list(map(float, input().strip().split()))x, a, b, c, d = numsfx = a * x ** 3 +……
母牛的故事(函数递归,数组解题)
摘要:解题思路:1、可使用函数递归2、使用数组注意事项:参考代码://======================母牛的故事=================//函数递归调用#include<stdio.h……
字符串的排序,纯傻瓜做法
摘要:解题思路:使用到strcmp函数比较字典数,三个字符串数量有限,完全可以列出所有可能的排列可能方式,按顺序依次比较三个字符串注意事项:puts函数自动换行参考代码://================……
2799: 奥运奖牌计数(详细注释)
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
int main()
{
int day, Gold, Silver, Bronze, sum_Gold, sum_S……
2798: 整数序列的元素最大跨度值(详细注释)
摘要:解题思路:注意事项:参考代码://解题思路:最大跨度=最大值-最小值,因而只要求出最大值与最小值,此题就迎刃而解了。
#include <stdio.h>
int main()
{
i……