题解列表

筛选

1013: [编程入门]Sn的公式求和

摘要:解题思路:利用字符串和eval()函数注意事项:参考代码:Sn = 0n = eval(input())for i in range(1, n+1):    Sn += eval('2&#39……

编写题解 1210: 小明A+B

摘要:解题思路:注意事项:参考代码:n=int(input()) for i in range(n):     a,b=map(int,input().split())     c=int(str(a……

编写题解 1204: 大小写转换

摘要:解题思路:注意事项:参考代码:while True:     try:         a=input()         for i in a:          

编写题解 1197: 发工资咯

摘要:解题思路:注意事项:参考代码:while True:     ls=list(map(int,input().split()))     if ls[0]==0:         break ……

1195: 去掉双斜杠注释

摘要:解题思路:注意事项:参考代码:while True:     try:         n=input()         if n[0]=='/' and n[1]==&#39……

编写题解 1190: 剔除相关数

摘要:解题思路:注意事项:参考代码:def to(a):     ls=[i for i in str(a)]     ls.sort()     return ls  def isgu(ls): ……

找到一个易漏点

摘要:解题思路:注意事项:测试时输入数值时存在例如:41     1 2 1 2 3 42 3 4 5没有补齐0的操作,因此会导致后续索引超出范围,因此需要增加补0操作,本地已运行成功但还是只有87%的通过……

编写题解 1182: 人民币问题

摘要:解题思路:注意事项:参考代码:n=int(input()) a=((n-3)//5) b=((n-6)//2) s=0 for i in range(1,a+1):     for j in……

1181: 不容易系列2

摘要:解题思路:两种方法 :一种用数学组合,一种用递归注意事项:参考代码:数学方法:def f(x):     s=1      for i in range(1,x):         s *=i ……