CSES - Datatähti 2023 alku - Results
Submission details
Task:Kortit
Sender:Matutao
Submission time:2022-10-31 21:00:27 +0200
Language:Java
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.13 sdetails
#20.13 sdetails
#30.13 sdetails
#40.13 sdetails
#50.13 sdetails
#60.13 sdetails

Code

import java.util.Scanner;

public class Kortit {
    public static void main(String[] args) {
        Scanner skanneri = new Scanner(System.in);
        while (skanneri.hasNextLong()) {
            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:

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:

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:

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:

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:

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:

input
52

correct output
YES

user output
YES

Error:
Exception in thread "main" java.lang.IllegalStateException: Scanner closed
	at java.base/j...