19302022-12-11 23:33:41mintaaronBevásárláspython3Runtime error 0/10017ms13412 KiB
x=0
abc = 'abcdefghijklmnopqrstuvwxyz'
n=int(input("Hány mondatot szeretnél tesztelni? "))
mondatok=[]
for i in range(n):
    mondat=input("Mondat: ")
    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 error17ms11020 KiB
2Wrong answer17ms11548 KiB
3Wrong answer16ms11604 KiB
subtask20/10
4Runtime error16ms11668 KiB
5Runtime error16ms11708 KiB
6Runtime error16ms11824 KiB
subtask30/20
7Runtime error17ms11940 KiB
8Wrong answer17ms12084 KiB
9Runtime error17ms12548 KiB
10Wrong answer17ms12432 KiB
subtask40/30
11Wrong answer17ms12304 KiB
12Runtime error17ms12640 KiB
13Runtime error17ms13060 KiB
14Wrong answer17ms12812 KiB
subtask50/40
15Wrong answer17ms12936 KiB
16Wrong answer17ms13060 KiB
17Wrong answer17ms13084 KiB
18Runtime error17ms13412 KiB
19Runtime error17ms13340 KiB
20Wrong answer17ms13260 KiB