- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 字符串分隔-Python实现-华为机试
Python实现: str1 = input() str2 = input() def splitchar(string): if len(string) <= 8: print(string.ljust(8,'0')) else: while len(string) > 8: print(string[:8]...
2020-03-07 22:44:00
555
1
原创 明明的随机数-Python实现-华为机试
Python实现: while True: try: n = int(input()) sample = set() for i in range(n): sample.add(int(input())) for m in sorted(sample): print(m) ...
2020-03-07 22:41:20
2392
原创 计算字符个数-Python实现-华为机试
Python实现: str1 = input() str2 = input() count = 0 for n in range(len(str1)): if str1[n].upper() == str2.upper(): count += 1 print(count)
2020-03-07 22:35:14
390
原创 字符串最后一个单词的长度-Python实现-华为机试
Python实现: str = input() str_ls = str.split( ) print (len(str_ls[-1]))
2020-03-07 22:23:06
266
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人