全字母句 SDUT

全字母句 SDUT

Time Limit: 1000 ms Memory Limit: 65536 KiB
Submit Statistic
Problem Description

全字母句 (pangram) 指包含字母表中全部 26 种英文字母(不区分大小写)的句子,其常被用于展示英文字体的显示效果。

现在,bLue 得到了很多句子,他想知道哪些句子是全字母句。

Input

输入数据有多组(数据组数不超过 100),到 EOF 结束。

每组数据包含一行长度不超过 100 的字符串。

Output

对于每组数据,输出一行。

如果是全字母句则输出 “Yes”,否则输出 “No”(不包括引号)。

Sample Input

The quick brown fox jumps over the lazy dog.
The 6th ACM Funny Programming For/While Contest

Sample Output

Yes
No

Hint

Source

【第六届ACM趣味编程循环赛 Round #3】bLue

#include<stdio.h>
#include<string.h>
int main()
{
char a[1000];
char k;
int t;

while(gets(a))
{  t=0;
    int n=strlen(a);
    for(int i=0;i<n;i++)
    {
        if(a[i]>='A'&&a[i]<='Z')
            a[i]+=32;

    }
     for( k='a';k<='z';k++)
        {
            for(int i=0;i<n;i++)
            {
                if(a[i]==k)
                {
                    t++;
                    break;
                }
            }
        }
    if(t==26) printf("Yes\n");
    else printf("No\n");
}
return 0;

}

/***************************************************
User name: jk180233李清璇
Result: Accepted
Take time: 0ms
Take Memory: 100KB
Submit time: 2019-01-02 20:59:37
****************************************************/

猜你喜欢

转载自blog.csdn.net/weixin_43892738/article/details/85709099