CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:ov
Submission time:2020-10-06 22:10:34 +0300
Language:Python3 (CPython3)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.06 sdetails
#2ACCEPTED0.06 sdetails
#3ACCEPTED0.06 sdetails

Code

n = input()
counter = 0

for i in range(int(n)):
    word = input()
    samecharacters = 1
    even = 0
    compared = []
    for j in range(len(word)):
        samecharacters = 1
        character = word[j]
        for k in range(len(word)): 
            character2 = word[k] 
            if character == character2 and j != k and character not in compared: 
                samecharacters = samecharacters + 1 
        compared.append(character)

        if (samecharacters % 2) == 0 and (k + 1) == len(word): 
            even = even + 1

    compared = list(dict.fromkeys(compared))
    if even == len(compared):    
        counter = counter + 1                                                                                                           
                                                                                    
print(counter)

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