PAT (Basic Level) Practice Python解法 1042 字符统计
ckl = [0]*26
import sys
info = sys.stdin.readline()
info = info.lower()
for s in info:
if s.islower():
ckl[ord(s)-97]+=1
num = ckl.index(max(ckl))
print(chr(num+97),max(ckl))
PAT (Basic Level) Practice Python解法 1042 字符统计
ckl = [0]*26
import sys
info = sys.stdin.readline()
info = info.lower()
for s in info:
if s.islower():
ckl[ord(s)-97]+=1
num = ckl.index(max(ckl))
print(chr(num+97),max(ckl))

被折叠的 条评论
为什么被折叠?
