您的位置:首页 > 其它

hdu 1219 AC Me

2013-02-04 15:20 267 查看
http://acm.hdu.edu.cn/showproblem.php?pid=1219

#include<stdio.h>

#include<string.h>

char s[100001];

int a[26];

int main()

{

 int i;

while(gets(s))

{

 memset(a,0,sizeof(a));

for(i=0;i<strlen(s);i++)

{

if(s[i]>='a'&&s[i]<='z')

a[s[i]-'a']++;

}

for(i=0;i<26;i++)

printf("%c:%d\n",i+'a',a[i]);

printf("\n");

}

return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: