#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
while(getline(cin,a)!=NULL)
{
int lenNum=0;
int zimuNum=0,zimuFlag=0,zimu[2];
int shuziNum=0,shuziFlag=0;
int fuhaoNum=0,fuhaoFlag=0;
int jiangliNum=0;
for(int i=0; i<a.size(); i++)
if(a[i]<='9'&&a[i]>='0')shuziFlag++;
else if(a[i]<='Z'&&a[i]>='A')
{
zimuFlag=1;
zimu[0]=1;
}
else if(a[i]<='z'&&a[i]>='a')
{
zimuFlag=1;
zimu[1]=1;
}
else fuhaoFlag++;
if(a.size()<=4)lenNum=5;
else if(a.size()<=7)lenNum=10;
else lenNum=25;
if(zimuFlag==0)zimuNum=0;
else if(zimu[0]==1&&zimu[1]==1)zimuNum=20;
else zimuNum=10;
if(shuziFlag==0)shuziNum=0;
else if(shuziFlag==1)shuziNum=10;
else shuziNum=20;
if(fuhaoFlag==0)fuhaoNum=0;
else if(fuhaoFlag==1)fuhaoNum=10;
else fuhaoNum=25;
if(shuziFlag>0&&zimuFlag>0)jiangliNum=2;
else if(shuziFlag>0&&zimuFlag>0&&fuhaoFlag>0)jiangliNum=3;
else if(shuziFlag>0&&zimuFlag>0&&fuhaoFlag>0&&zimu[0]==1&&zimu[1]==1)jiangliNum=5;
int Num=lenNum+zimuNum+shuziNum+fuhaoNum+jiangliNum;
if(Num>=90)cout<<"VERY_SECURE"<<endl;
else if(Num>=80)cout<<"SECURE"<<endl;
else if(Num>=70)cout<<"VERY_STRONG"<<endl;
else if(Num>=60)cout<<"STRONG"<<endl;
else if(Num>=50)cout<<"AVERAGE"<<endl;
else if(Num>=25)cout<<"WEAK"<<endl;
else if(Num>=0)cout<<"VERY_WEAK"<<endl;
}
return 0;
}
密码强度等级
最新推荐文章于 2022-04-12 21:43:54 发布