woyaoAKIOI0924PTY @ 2024-08-24 22:01:21
#include<bits/stdc++.h>
using namespace std;
string s,mima[105];
int tatol=0;
int main()
{
cin>>s;
for(int i=0;i<s.size();++i)
{
if(s[i]==',')
{
tatol++;
continue;
}
mima[tatol]+=s[i];
}
for(int i=0;i<=tatol;++i)
{
bool ok=false;
int da=0,xiao=0,shu=0,teshu=0;
for(int j=0;j<mima[i].size();++j)
{
char c=mima[i][j];
if(c>='a'&& c<='z')
{
xiao++;
continue;
}
if(c>='A'&& c<='Z')
{
da++;
continue;
}
if(c>='0'&& c<='9')
{
shu++;
continue;
}
if(c=='!')
{
teshu++;
continue;
}
if(c=='@')
{
teshu++;
continue;
}
if(c=='#')
{
teshu++;
continue;
}
if(c=='$')
{
teshu++;
continue;
}
ok=true;
}
if(mima[i].size()>12||mima[i].size()<6)
ok=false;
if(ok==true&&((da>=1&&xiao>=1)||(xiao>=1&&shu>=1)||(shu>=1&&da>=1))&&teshu>=1)
cout<<mima[i]<<endl;
}
return 0;
}
by hyl_____ @ 2024-08-24 22:13:38
#include<bits/stdc++.h>
using namespace std;
string s,mima[105];
int tatol=0;
int main()
{
cin>>s;
for(int i=0;i<s.size();++i)
{
if(s[i]==',')
{
tatol++;
continue;
}
mima[tatol]+=s[i];
}
for(int i=0;i<=tatol;++i)
{
bool ok=true;
int da=0,xiao=0,shu=0,teshu=0;
for(int j=0;j<mima[i].size();++j)
{
char c=mima[i][j];
if(c>='a'&& c<='z')
{
xiao++;
continue;
}
else if(c>='A'&& c<='Z')
{
da++;
continue;
}
else if(c>='0'&& c<='9')
{
shu++;
continue;
}
else if(c=='!')
{
teshu++;
continue;
}
else if(c=='@')
{
teshu++;
continue;
}
else if(c=='#')
{
teshu++;
continue;
}
else if(c=='$')
{
teshu++;
continue;
}
else
{
ok=false;
}
}
if(mima[i].length()>12||mima[i].length()<6)
ok=false;
if(ok==true&&((da>=1&&xiao>=1)||(xiao>=1&&shu>=1)||(shu>=1&&da>=1))&&teshu>=1)
cout<<mima[i]<<endl;
}
return 0;
}
by hyl_____ @ 2024-08-24 22:13:53
@woyaoAKIOI0924PTY
by woyaoAKIOI0924PTY @ 2024-08-25 07:49:20
可以告诉我哪错了吗??
已关
by duantong @ 2024-08-26 14:42:14
@woyaoAKIOI0924PTY
else没加
求关