CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:Totska
Submission time:2021-09-15 17:33:37 +0300
Language:Python3 (PyPy3)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.07 sdetails
#2ACCEPTED0.07 sdetails
#3ACCEPTED0.07 sdetails

Code

n = int(input())

sanat = [input() for i in range(n)]

# print(sanat)

let = {}
for i in range(97, 123):
    let[chr(i)] = 0

result = 0

for word in sanat:
    l = let.copy()
    fail = False

    for ch in word:
        l[ch] += 1

    for key in l:
        if l[key] % 2 != 0:
            fail = True
            break
    if fail:
        continue
    else:
        result += 1

print(result)

Test details

Test 1

Verdict: ACCEPTED

input
1000
korvata
sopimusaika
nuhatartunta
korttiautomaatti
...

correct output
15

user output
15

Test 2

Verdict: ACCEPTED

input
1000
pub
hansikaslokero
erikoisvalmisteinen
unijukka
...

correct output
42

user output
42

Test 3

Verdict: ACCEPTED

input
1000
haapalastu
toipumisaika
mustalaiskieli
taidelainaamo
...

correct output
70

user output
70