2296 | 2023-01-09 20:40:30 | neszbal | Kvázi-Izogram | python3 | Accepted 100/100 | 208ms | 16044 KiB |
N = int(input())
mondatok = []
for i in range(N):
mondatok.append(input().replace(" ", "").lower())
izogarom = 0
for mondat in mondatok:
betuk_szama = {}
izoga = True
for betu in mondat:
if betu.isalpha() == False:
continue
if betu not in betuk_szama:
betuk_szama[betu] = 1
else:
betuk_szama[betu] += 1
for betu in betuk_szama:
if betuk_szama[betu] > 2:
izoga = False
if izoga:
izogarom += 1
print(izogarom)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11316 KiB | ||||
2 | Accepted | 17ms | 11672 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 16ms | 11344 KiB | ||||
4 | Accepted | 17ms | 11752 KiB | ||||
5 | Accepted | 17ms | 11812 KiB | ||||
6 | Accepted | 18ms | 11956 KiB | ||||
7 | Accepted | 41ms | 13648 KiB | ||||
subtask3 | 50/50 | ||||||
8 | Accepted | 17ms | 12124 KiB | ||||
9 | Accepted | 18ms | 12548 KiB | ||||
10 | Accepted | 17ms | 12844 KiB | ||||
11 | Accepted | 17ms | 13080 KiB | ||||
12 | Accepted | 17ms | 13212 KiB | ||||
13 | Accepted | 17ms | 13356 KiB | ||||
subtask4 | 20/20 | ||||||
14 | Accepted | 27ms | 13104 KiB | ||||
15 | Accepted | 35ms | 13396 KiB | ||||
16 | Accepted | 54ms | 13692 KiB | ||||
17 | Accepted | 96ms | 14608 KiB | ||||
18 | Accepted | 166ms | 15536 KiB | ||||
19 | Accepted | 194ms | 15628 KiB | ||||
20 | Accepted | 208ms | 16044 KiB |