#include #include #include #include #include #include #include int minimumNumber(int n, char* password) { char numbers[] = "0123456789",lower_case[] = "abcdefghijklmnopqrstuvwxyz",upper_case[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",special_characters[] = "!@#$%^&*()-+"; int num=0,up=0,low=0,special=0,count=0; for(int i=0;i0 && up>0 && low>0 && special>0) { break; } } if(num==0) count++; if(up==0) count++; if(low==0) count++; if(special==0) count++; if(n>=6) return count; else return n+count<6?(6-n):count; // Return the minimum number of characters to make the password strong } 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; }