ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1370. Magician

(JAVA) Crash on 2
Posted by Lucas Magroski 30 May 2008 06:33
import java.util.Scanner;

public class Magician {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int digitos = in.nextInt();
        int cliques = in.nextInt();
        String saida = "";
        String parte2 = "";

        for (int i = 1; i <= cliques; i++){
            saida += in.nextInt();
        }

        for (int i = cliques+1; i <= digitos; i ++){
            parte2 += in.nextInt();
        }

        parte2 += saida;

        System.out.println( parte2.substring(0,10) );
    }

}


I can't see, why its crashing