Task: | Kortit |
Sender: | Matutao |
Submission time: | 2022-10-31 21:01:20 +0200 |
Language: | Java |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.13 s | details |
#2 | RUNTIME ERROR | 0.13 s | details |
#3 | RUNTIME ERROR | 0.13 s | details |
#4 | RUNTIME ERROR | 0.13 s | details |
#5 | RUNTIME ERROR | 0.13 s | details |
#6 | RUNTIME ERROR | 0.13 s | details |
Code
import java.util.Scanner; public class Kortit { public static void main(String[] args) { Scanner skanneri = new Scanner(System.in); while (skanneri.hasNextInt()) { int kortit = skanneri.nextInt(); skanneri.close(); if(kortit > 26){ System.out.println("YES"); } else if(kortit == 1){ System.out.println("NO"); } else{ System.out.println("MAYBE"); } } } }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
0 |
correct output |
---|
NO |
user output |
---|
MAYBE |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...
Test 2
Verdict: RUNTIME ERROR
input |
---|
1 |
correct output |
---|
NO |
user output |
---|
NO |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...
Test 3
Verdict: RUNTIME ERROR
input |
---|
2 |
correct output |
---|
MAYBE |
user output |
---|
MAYBE |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...
Test 4
Verdict: RUNTIME ERROR
input |
---|
26 |
correct output |
---|
MAYBE |
user output |
---|
MAYBE |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...
Test 5
Verdict: RUNTIME ERROR
input |
---|
27 |
correct output |
---|
YES |
user output |
---|
YES |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...
Test 6
Verdict: RUNTIME ERROR
input |
---|
52 |
correct output |
---|
YES |
user output |
---|
YES |
Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed at java.base/j...