19312022-12-11 23:35:19mintaaronBevásárláspython3Runtime error 0/10017ms13108 KiB
x=0
abc = 'abcdefghijklmnopqrstuvwxyz'
n=int(input())
mondatok=[]
for i in range(n):
    mondat=input()
    mondatok.append(mondat)

def fgv(t):
    for k in range(len(t)):
        c = 0
        for l in range(len(t)):
            if t[k]==t[l]:
                c+=1
                if t[k] not in abc:
                    c -= 1
                if c > 2:
                    return 0
    if c<=2:
        return 1

for i in mondatok:
    a = ""
    for j in i.split():
        for k in j:
            a+=k
    x+=fgv(a.lower())
print(x)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error17ms11144 KiB
2Wrong answer17ms11424 KiB
3Wrong answer17ms11672 KiB
subtask20/10
4Runtime error17ms11812 KiB
5Runtime error17ms11596 KiB
6Runtime error17ms12180 KiB
subtask30/20
7Runtime error17ms11980 KiB
8Wrong answer17ms11880 KiB
9Runtime error17ms11900 KiB
10Wrong answer17ms12148 KiB
subtask40/30
11Wrong answer17ms11952 KiB
12Runtime error17ms12312 KiB
13Runtime error17ms12428 KiB
14Wrong answer17ms12572 KiB
subtask50/40
15Wrong answer17ms12676 KiB
16Wrong answer17ms12768 KiB
17Wrong answer17ms13108 KiB
18Runtime error17ms13056 KiB
19Runtime error17ms12964 KiB
20Wrong answer17ms12924 KiB