Task: | Lehmät |
Sender: | Hervanta |
Submission time: | 2022-11-01 02:08:24 +0200 |
Language: | Node.js |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | RUNTIME ERROR | 0.11 s | 1, 2 | details |
#2 | RUNTIME ERROR | 0.11 s | 1, 2 | details |
#3 | RUNTIME ERROR | 0.11 s | 1, 2 | details |
#4 | RUNTIME ERROR | 0.11 s | 1, 2 | details |
#5 | RUNTIME ERROR | 0.11 s | 1, 2 | details |
#6 | RUNTIME ERROR | 0.11 s | 2 | details |
#7 | RUNTIME ERROR | 0.11 s | 2 | details |
#8 | RUNTIME ERROR | 0.11 s | 2 | details |
#9 | RUNTIME ERROR | 0.11 s | 2 | details |
Code
const { readSync } = require('fs'); const { Buffer } = require('buffer'); function readInput() { let buffer = Buffer.alloc(1000, 10); for(i=0; i<1000; i++) { if(!readSync(0, buffer, i, 1) || buffer[i]===10) { return buffer.toString("utf8").split("\n")[0]; } } } input = input2.split("\n") let cowCount = 0 const re = /\*+[@\.]+\*+/ input = readInput() for (let i = 0; i < input.length; i++) { if (input[i].match(re)) { cowCount += input[i].match(re)[0].split("@").length - 1 } } console.log(cowCount)
Test details
Test 1
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
3 3 *** *.* *** |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 2
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
3 3 *** *@* *** |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 3
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
5 10 ...@...... ..******.. @.*@@@@*.@ ..******.. ... |
correct output |
---|
4 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 4
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
10 10 @@...@.@@@ ..@@.@@..@ @.*******@ ..*@....*. ... |
correct output |
---|
11 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 5
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
10 10 ********** *@@@@@@@@* *@@@@@@@@* *@@@@@@@@* ... |
correct output |
---|
64 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 6
Group: 2
Verdict: RUNTIME ERROR
input |
---|
100 100 .........................@....... |
correct output |
---|
60 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 7
Group: 2
Verdict: RUNTIME ERROR
input |
---|
100 100 ..@@..........@......@....@@..... |
correct output |
---|
1507 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 8
Group: 2
Verdict: RUNTIME ERROR
input |
---|
100 100 .@..@@..@@.@..@..@..@@..@..@..... |
correct output |
---|
3348 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...
Test 9
Group: 2
Verdict: RUNTIME ERROR
input |
---|
100 100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
correct output |
---|
7225 |
user output |
---|
(empty) |
Error:
/box/input/code.js:13 input = input2.split("\n") ^ ReferenceError: input2 is not defined...