112012024-07-16 12:50:5142Kvázi-Izogrampython3Accepted 100/100204ms3080 KiB
from sys import stdin
input = stdin.readline

def main():
    res = 0
    for i in range(int(input())):
        d={}
        for c in input():
            if c.isalpha():
                cc=c.lower()
                d[cc]=d.get(cc,0)+1
        ok=True
        for cc in d:
            if d[cc]>2:
                ok=False
                break
        if ok:
            res+=1
    print(res)

main()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2960 KiB
2Accepted17ms2976 KiB
subtask230/30
3Accepted17ms3044 KiB
4Accepted17ms2960 KiB
5Accepted17ms2976 KiB
6Accepted19ms2972 KiB
7Accepted30ms3064 KiB
subtask350/50
8Accepted19ms2952 KiB
9Accepted19ms3080 KiB
10Accepted18ms2876 KiB
11Accepted19ms3044 KiB
12Accepted18ms3044 KiB
13Accepted19ms3044 KiB
subtask420/20
14Accepted28ms2960 KiB
15Accepted37ms3044 KiB
16Accepted57ms3044 KiB
17Accepted90ms2996 KiB
18Accepted149ms2916 KiB
19Accepted189ms2956 KiB
20Accepted204ms3044 KiB