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

Compiler report

input/Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
input/Main.java:4: error: cannot find symbol
        	Scanner lukija = new Scanner(System.in);
        	^
  symbol:   class Scanner
  location: class Main
input/Main.java:4: error: cannot find symbol
        	Scanner lukija = new Scanner(System.in);
        	                     ^
  symbol:   class Scanner
  location: class Main
input/Main.java:6: error: cannot find symbol
                String eka = a;
                             ^
  symbol:   variable a
  location: class Main
input/Main.java:8: error: incompatible types: int cannot be converted to boolean
                            if(apu = 1){
                                   ^
input/Main.java:11: error: incompatible types: int cannot be converted to boolean
                            if(apu = 2){
                                   ^
input/Main.java:14: error: incompatible types: int...

Code

import java.util.scanner;
public class Main {
	public static void main (String [] args){
        	Scanner lukija = new Scanner(System.in);
                int apu = Integer.valueOf(lukija.nextLine());
                String eka = a;
		while(apu>1){
                            if(apu = 1){
                                       eka = "b" + eka + "b";
                            }
                            if(apu = 2){
                                       eka = "c" + eka + "c";
                            }
                            if(apu = 3){
                                       eka = "d" + eka + "d";
                            }
                            if(apu = 4){
                                       eka = "e" + eka + "e";
                            }
                            if(apu = 5){
                                       eka = "f" + eka + "f";
                            }
                            if(apu = 6){
                                       eka = "g" + eka + "g";
                            }
                            if(apu = 7){
                                       eka = "h" + eka + "h";
                            }                           
		}
                System.out.println(eka);
	}
}