题解列表
暴力解法(凑字数。。。。。。。
摘要:解题思路:注意事项:参考代码:def shu(gewei,ci): if ci==1: return gewei else: return gewei*10*……
题解 | 3008: 买笔(简单易懂)
摘要:## 代码
```python
# 方法1
x = int(input())
pen_4 = int(x/4)
surplus = x%4
if(surplus == 3):……
1062: 二级C语言-公约公倍 辗转相除法
摘要:解题思路:数学题,把公式带入。注意事项:参考代码:def gcd(x, y): m = max(x, y) n = min(x, y) while m % n: m, n = ……
1042: [编程入门]电报加密 简单的凯撒密码
摘要:解题思路:一看就是凯撒密码,循环替换就正确。注意事项:参考代码:x=input()s=""for i in x: if i>="a" and i<="z" or i>="A" and i<="Z"……
1016: [编程入门]水仙花数判断 稍稍复杂的循环判断
摘要:解题思路:就是简单循环判断题的加强版,设置范围,然后循环就好了。注意事项:参考代码:for i in range(100,1000): string=str(i) a=string[0] ……
暴力解法(凑字数。。。。。。。
摘要:解题思路:注意事项:参考代码:n=list(input())m=n.copy()n.reverse()c=m+nfor i in c: print(i,end='')……
直接用python内置函数
摘要:解题思路:注意事项:参考代码:import mathfor i in range(1,40): if math.gcd(i,40)==1: print('%d/40'……
暴力解法(凑字数。。。。。。。
摘要:解题思路:注意事项:参考代码:def yinzi(n): sum=0 for i in range(1,n//2+1): if n %i==0: sum……
1231基础解法(Python)
摘要:解题思路:没啥思路注意事项:注意print()才是空一行,print('\n')是空两行参考代码:lst_rec = list(map(int, input().split()))fo……