fork download
#include <stdio.h>

int main(void) {
    int n, count = 0;
    scanf("%d", &n);
    
    for (int i = 0; i < n; i++) {
        int alphabet[26] = {0};
        char word[100];
        scanf("%s", word);

        for (int j = 0; word[j] != '\0'; j++) {
            int index = word[j] - 'a';
            if (alphabet[index] == 0) {
                alphabet[index] = 1;
            } else {
                count++;
                break;
            }
        }
    }
    
    printf("%d\n", count);

    return 0;
}
Success #stdin #stdout 0s 5284KB
stdin
3
happy
new
year
stdout
1