天山折梅手
天山折梅手
全部文章
分类
题解(7)
归档
标签
去牛客网
登录
/
注册
天山折梅手的博客
全部文章
(共5篇)
题解 | #等差数列python3#
while True: try: x = int(input()) s = 0 for i in range(x): s += i*3 + 2 print(int(s)) except: ...
Python3
2021-11-01
12
802
题解 | #截取字符串python3#
while True: try: str1 = input() k = int(input()) print(str1[:k]) except: break
Python3
2021-10-29
42
3996
题解 | #字符个数统计python3#
while True: try: str = ''.join(set(input())) count = 0 for i in str: if 0 <= ord(i) <= 127: ...
Python3
2021-10-29
18
1881
题解 | #尼科彻斯定理python3#
while True: try: m = int(input()) l = [i for i in range(m*(m-1)+1,m*(m+1)) if i%2 !=0] print('+'.join(map(str,l))) exc...
Python3
2021-10-29
38
4667
题解 | #字符串反转python3#
1.用reversed函数 print(''.join(reversed(input()))) 2.切片函数 print(input()[::-])
Python3
2021-10-27
56
7215