题解列表

筛选

2861: 验证子串(python)

摘要:解题思路:注意事项:参考代码:a = input().strip() # 注意把前导空格去掉 b = input().strip() if a in b:     print("%s is s……

2858: 整理药名(python)

摘要:解题思路:注意事项:参考代码:n = int(input()) while True: try: s = input() s1 = "" for i in s:   ……

2857: 加密的病历单(python)

摘要:解题思路:注意事项:参考代码:s = input() s1 = "" for i in s:     if (i >= &#39;x&#39; and i <= &#39;z&#39;) or ……

2839: 石头剪刀布(Python)

摘要:解题思路:注意事项:参考代码:N,NA,NB = map(int,input().split()) la = list(map(int,input().split())) lb = list(ma……

2819: 数字反转

摘要:解题思路:注意事项:参考代码:a = input() a = a[::-1]  # 字符串逆序 if a[len(a)-1] == &#39;-&#39;:  # 如果输入负数     a = ……

2826: 雇佣兵(python)

摘要:解题思路:注意事项:参考代码:from decimal import * M,N,X = map(int,input().split()) while X > 0 and X * N >= M: ……

2818: 分离整数的各个数位

摘要:解题思路:注意事项:参考代码:a = input() for i in a[::-1]:     print(i,end=&#39; &#39;)代码2:a = input() a = a[::……

2817: 级数求和

摘要:注意事项:参考代码:Sn = n = 0 k = int(input()) while True:     n = n + 1     Sn = Sn + 1/n      if Sn >