#include using namespace std; int minimumNumber(int n, string password) { int lo=0,d=0,u=0,l=0,s=0,req=0,other=0; string sp="!@#$%^&*()-+"; if(n>=6) l=1; else req=6-n; for(int i=0;i<=n;i++) { char c= password[i]; if(isdigit(c)) d=1; if(isupper(c)) u=1; if(islower(c)) lo=1; for(int j=0;j<12;j++) { if(password[i]==sp[j]) s=1; } } if(req==3) return req; else { if(d==0) other++; if(u==0) other++; if(lo==0) other++; if(s==0) other++; if(req> n; string password; cin >> password; int answer = minimumNumber(n, password); cout << answer << endl; return 0; }