企鹅仔


私信TA

用户名:dotcpp0594011

访问量:1226

签 名:

你那句没说出口的再见,时间替你说了。

等  级
排  名 743
经  验 3721
参赛次数 1
文章发表 8
年  龄 0
在职情况 学生
学  校 厦门大学
专  业 自动化

  自我简介:

再不学就结婚了

解题思路:

注意事项:比较简单,没什么好主意的

参考代码:#include<stdio.h>
#include<string.h>
#include <ctype.h>
#include<math.h>
int main()
{
    int n,i;
    char str[100];
    scanf("%d",&n);
    while(n!=0)
    {
        int a=0,b=0,c=0,d=0;
        scanf("%s",&str);
        for(i=0;i<strlen(str);i++)//循环判断每一位
        {
            if('a'<=str[i]&&str[i]<='z')
            a++;
            if('A'<=str[i]&&str[i]<='Z')
            b++;
            if('0'<=str[i]&&str[i]<='9')
            c++;
            if(str[i]=='~'||str[i]=='!'||str[i]=='@'||str[i]=='#'||str[i]=='$'||str[i]=='%'||str[i]=='^')
            d++;
        }
        if(strlen(str)>=8&&strlen(str)<=16&&(a*b*c!=0||a*b*d!=0||b*c*d!=0||a*c*d!=0))//判断题意条件
        printf("YES\n");
        else
        printf("NO\n");
        n--;
    }
    return 0;
 }

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区