注意空格的格式
#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int main()
{
int n;
//freopen("1007.txt","r",stdin);
//printf("here\n");
scanf("%d",&n);
scanf("\n");
string s;
for(int i=0;i<n;i++)
{
int flag1=0,flag2=0,error=0,flag3=0;
getline(cin,s);
int len=s.length();
//cout<<s<<endl;
//printf("len=%d\n",len);
if(len>=6)
{
for(int j=0;j<len;j++)
{
if(s[j]>='a'&&s[j]<='z')
{
flag1=1;
}
else if(s[j]>='A'&&s[j]<='Z')
{
flag1=1;
}
else if(s[j]>='0'&&s[j]<='9')
{
flag2=1;
}
else if(s[j]=='.')
flag3=1;
else
{
error=1;break;
}
}
if(error)
{
printf("Your password is tai luan le.\n");
}
else
{
//printf("f1=%d f2=%d\n",flag1,flag2);
if(flag1==1&&flag2==0)
printf("Your password needs shu zi.\n");
if(flag1==0&&flag2==1)
printf("Your password needs zi mu.\n");
if(flag1==1&&flag2==1)
printf("Your password is wan mei.\n");
}
}
else
printf("Your password is tai duan le.\n");
}
return 0;
}