用python实现PAT1057数零壹

来源:互联网 发布:星际战甲腐蚀投射数据 编辑:程序博客网 时间:2024/06/06 07:43
s=input().lower()count1=0for i in s:    if i.isalpha():        count1+=ord(i)%96a=0;b=0while count1!=0:    if count1%2==0:        a+=1    else:        b+=1    count1//=2print(a,b)
原创粉丝点击