CSES - Datatähti 2021 alku - Results
Submission details
Task:Sanalista
Sender:Lookas123
Submission time:2020-09-29 18:35:18 +0300
Language:Node.js
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.43 sdetails
#20.43 sdetails
#30.43 sdetails

Code

const readline = require('readline');

const r = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});
function doubles(str){
    let foundletters=[];
    for(let i of str) {
        if(foundletters.includes(i)){
            foundletters.splice(foundletters.indexOf(i),1);
        }
        foundletters.push(i);
    }
    return Number(foundletters==[])
}
const lines = readline(1)
let workinglines;
for(let i = 0; i<lines; i++){
    workinglines += doubles(readline(i+1));
}
console.log(workinglines);

Test details

Test 1

Verdict:

input
1000
korvata
sopimusaika
nuhatartunta
korttiautomaatti
...

correct output
15

user output
(empty)

Error:
/box/input/code.js:18
const lines = readline(1)
              ^

TypeError: readline is no...

Test 2

Verdict:

input
1000
pub
hansikaslokero
erikoisvalmisteinen
unijukka
...

correct output
42

user output
(empty)

Error:
/box/input/code.js:18
const lines = readline(1)
              ^

TypeError: readline is no...

Test 3

Verdict:

input
1000
haapalastu
toipumisaika
mustalaiskieli
taidelainaamo
...

correct output
70

user output
(empty)

Error:
/box/input/code.js:18
const lines = readline(1)
              ^

TypeError: readline is no...