CSES - Datatähti 2022 alku - Results
Submission details
Task:Merkkijono
Sender:ToukoP
Submission time:2021-10-04 22:35:27 +0300
Language:Node.js
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.44 sdetails
#20.44 sdetails
#30.43 sdetails
#40.44 sdetails
#50.44 sdetails
#60.43 sdetails
#70.44 sdetails
#80.43 sdetails
#90.44 sdetails
#100.44 sdetails
#110.43 sdetails
#120.44 sdetails
#130.43 sdetails
#140.44 sdetails
#150.43 sdetails
#160.44 sdetails

Code

var readline = require('readline');
var r = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});


function merkkijono(n) {
    const abc = 'abcdefghijklmnopqrstuvwxyz';
    let result = [];
    for (let i = 0; i < n; i++) {
        const c = abc[i];
        result = [...result.flatMap(v => [c, v]), c];
    }
    console.log(result.join(''));
}

r.on('line', function (line) {
    merkkijono(parseInt(line));
});

Test details

Test 1

Verdict:

input
1

correct output
a

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 2

Verdict:

input
2

correct output
bab

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 3

Verdict:

input
3

correct output
cbcacbc

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 4

Verdict:

input
4

correct output
dcdbdcdadcdbdcd

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 5

Verdict:

input
5

correct output
edecedebedecedeaedecedebedeced...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 6

Verdict:

input
6

correct output
fefdfefcfefdfefbfefdfefcfefdfe...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 7

Verdict:

input
7

correct output
gfgegfgdgfgegfgcgfgegfgdgfgegf...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 8

Verdict:

input
8

correct output
hghfhghehghfhghdhghfhghehghfhg...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 9

Verdict:

input
9

correct output
ihigihifihigihieihigihifihigih...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 10

Verdict:

input
10

correct output
jijhjijgjijhjijfjijhjijgjijhji...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 11

Verdict:

input
11

correct output
kjkikjkhkjkikjkgkjkikjkhkjkikj...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 12

Verdict:

input
12

correct output
lkljlklilkljlklhlkljlklilkljlk...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 13

Verdict:

input
13

correct output
mlmkmlmjmlmkmlmimlmkmlmjmlmkml...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 14

Verdict:

input
14

correct output
nmnlnmnknmnlnmnjnmnlnmnknmnlnm...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 15

Verdict:

input
15

correct output
onomonolonomonokonomonolonomon...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

Test 16

Verdict:

input
16

correct output
popnpopmpopnpoplpopnpopmpopnpo...

user output
(empty)

Error:
/box/input/code.js:14
        result = [...result.flatMap(v => [c, v]), c];
                            ^

TypeError: result.flatMap(...) is not a function or its return value is not iterable
    at merkkijono (/box/input/code.js:14:29)
    at Interface.<anonymous> (/box/input/code.js:20:5)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at ReadStream.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at ReadStream.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)