CSES - Aalto Competitive Programming 2024 - wk1 - Mon - Results
Submission details
Task:Stone game
Sender:Sakari
Submission time:2024-09-02 17:38:22 +0300
Language:Java
Status:COMPILE ERROR

Compiler report

input/test.java:9: error: cannot find symbol
        int a = Integer.parseInt(arrS(0));
                                 ^
  symbol:   method arrS(int)
  location: class test
input/test.java:10: error: cannot find symbol
        int b = Integer.parseInt(arrS(1));
                                 ^
  symbol:   method arrS(int)
  location: class test
2 errors

Code

import java.util.Scanner;
public class test{

    public static void main( String args[]){
        int y = 0;
        Scanner x = new Scanner(System.in);
        String in = x.nextLine();
        String[] arrS = in.split(" ");
        int a = Integer.parseInt(arrS(0));
        int b = Integer.parseInt(arrS(1));
        if (a==b) {
            System.out.println("Maija");
        }
        else {
            System.out.println("Uolevi");   
        }
}
}