标签:des style blog http color java os strong
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29823 Accepted Submission(s): 11976
#include <stdio.h> #include <string.h> int main() { char s[55]; char ope[]="~!@#$%^\0"; int f,f1,f2,f3,f4,M,i,j; scanf("%d",&M); getchar(); while(M--) { gets(s); f1=f2=f3=f4=f=0; if(strlen(s)>=8&&strlen(s)<=16)f=1; if(f) for(i=0;s[i];i++) { if(s[i]>=‘a‘&&s[i]<=‘z‘)f1=1; if(s[i]>=‘A‘&&s[i]<=‘Z‘)f2=1; if(s[i]>=‘0‘&&s[i]<=‘9‘)f3=1; for(j=0;ope[j];j++)if(s[i]==ope[j])f4=1; } if(f1+f2+f3+f4>=3&&f)printf("YES\n"); else printf("NO\n"); } return 0; }
#include <stdio.h>
#include <string.h>
int main()
{
char s[55];
char ope[]="~!@#$%^\0";
int f,f1,f2,f3,f4,M,i,j;
scanf("%d",&M);
getchar();
while(M--)
{
gets(s);
f1=f2=f3=f4=f=0;
if(strlen(s)>=8&&strlen(s)<=16)f=1;
if(f)
for(i=0;s[i];i++)
{
if(s[i]>=‘a‘&&s[i]<=‘z‘)f1=1;
if(s[i]>=‘A‘&&s[i]<=‘Z‘)f2=1;
if(s[i]>=‘0‘&&s[i]<=‘9‘)f3=1;
for(j=0;ope[j];j++)if(s[i]==ope[j])f4=1;
}
if(f1+f2+f3+f4>=3&&f)printf("YES\n");
else printf("NO\n");
}
return 0;
}
标签:des style blog http color java os strong
原文地址:http://www.cnblogs.com/2014acm/p/3887131.html