Task: | Sanalista |
Sender: | ov |
Submission time: | 2020-10-06 22:10:34 +0300 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.06 s | details |
#2 | ACCEPTED | 0.06 s | details |
#3 | ACCEPTED | 0.06 s | details |
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 |