CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:Sahari Kempo
Submission time:2020-10-05 18:57:37 +0300
Language:Python3 (PyPy3)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.09 sdetails
#2ACCEPTED0.09 sdetails
#3ACCEPTED0.10 sdetails

Code

def main():
    numberOfWords = int(input())
    parillistenSanojenMaara = 0
    aakkoset = ['a', 'b', 'c', 'd', 'e', 'f', 'g',
                'h', 'i', 'j', 'k', 'l', 'm', 'n',
                'o', 'p', 'q', 'r', 's', 't', 'u',
                'v', 'w', 'x', 'y', 'z']
    i = 0
    while i < numberOfWords:
        parillinen = 1
        kirjainDic = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0,
                      'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0,
                      'o': 0, 'p': 0, 'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0,
                      'v': 0, 'w': 0, 'x': 0, 'y': 0, 'z': 0}
        word = input()
        for x in range(0, word.__len__()):
            kirjainDic[word[x]] += 1
        for z in range(0, aakkoset.__len__()):
            if kirjainDic[aakkoset[z]] > 0:
                if kirjainDic[aakkoset[z]] % 2 == 0:
                    pass
                else:
                        parillinen = 0
        if parillinen == 1:
            parillistenSanojenMaara += 1
        i += 1
    print(parillistenSanojenMaara)
    return
main()

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