题解 | #质数因子#

字符个数统计

http://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50

【Python】双指针法

mystr=input()
str_len=len(mystr)
mystr=sorted(mystr)
i=j=0
count=0
while i<=j:
    for j in range(0,str_len):
        if(mystr[j]=='\n'):
            print(count)
            exit()
        elif mystr[i]!=mystr[j]:
            i=j
            count+=1
    break
print(count+1)


全部评论

相关推荐

不放弃的小鱼干很洒脱:好可爱的离职理由
点赞 评论 收藏
分享
评论
点赞
1
分享

创作者周榜

更多
牛客网
牛客企业服务