#include #include #include #include #include #include #include bool isPresent(char* string, int n) { char* spl = "!@#$%^&*()-+"; int i,j; for(i=0;i= '0' && password[i] <= '9') number = true; else if(password[i]>='a' && password[i]<='z') lower = true; else if(password[i]>='A' && password[i]<='Z') upper = true; } spl = isPresent(password, n); if(!number) answer++; if(!lower) answer++; if(!upper) answer++; if(!spl) answer++; return (n+answer<6)?6-n:answer; } int main() { int n; scanf("%i", &n); char* password = (char *)malloc(512000 * sizeof(char)); scanf("%s", password); int answer = minimumNumber(n, password); printf("%d\n", answer); return 0; }