CSES - Datatähti 2023 alku - Results
Submission details
Task:Kortit
Sender:THH
Submission time:2022-11-01 21:07:15 +0200
Language:Node.js
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.10 sdetails
#20.10 sdetails
#30.10 sdetails
#40.10 sdetails
#50.10 sdetails
#60.10 sdetails

Code

var a, n;

while (true) {
  const a = prompt();

  if (a !== null) {
    if (a !== "") {
      n = Number.parseInt(a);

      if (n <= 3) {
        console.log("NO");
      } else {
        if (n >= 5) {
          console.log("YES");
        } else {
          console.log("MAYBE");
        }
      }

      if (a !== null) {
        if (a !== "") {
          console.log("LOPPUSE");
        }
      }
    }
  }
}

Test details

Test 1

Verdict:

input
0

correct output
NO

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...

Test 2

Verdict:

input
1

correct output
NO

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...

Test 3

Verdict:

input
2

correct output
MAYBE

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...

Test 4

Verdict:

input
26

correct output
MAYBE

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...

Test 5

Verdict:

input
27

correct output
YES

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...

Test 6

Verdict:

input
52

correct output
YES

user output
(empty)

Error:
/box/input/code.js:4
  const a = prompt();
            ^

ReferenceError: prompt is not de...