CSES - Datatähti 2022 alku - Results
Submission details
Task:Karkit
Sender:user2874
Submission time:2021-10-12 09:54:09 +0300
Language:Java
Status:COMPILE ERROR

Compiler report

input/vastaus.java:19: error: ';' expected
                apu=1
                     ^
1 error

Code

import java.util.Scanner;
public class vastaus {
	public static void main (String [] args){
		Scanner lukija = new Scanner(System.in);
		int eka = Integer.valueOf(lukija.nextLine());
		int toka = Integer.valueOf(lukija.nextLine());
		int kolmas = Integer.valueOf(lukija.nextLine());
		int neljas = Integer.valueOf(lukija.nextLine());
		if(kolmas<toka && neljas<toka){
                        if(neljas<kolmas){
                        	System.out.println(eka/neljas);	
                        }
                        else{
                                System.out.println(eka/kolmas);	
                        }
                }else{
                int apu = 0;
            if(eka%toka!=0){
                apu=1
            }
			System.out.println((eka/toka)+apu);	
		}
	}
}