Rezultati

Up. imeNalogaJezikRezultatČas oddaje
abr Hierarhija Java 100/100OK 11. maj '17 @ 17:00

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 34,789 MiB 0,000 s OK
#2 10/10 33,848 MiB 0,000 s OK
#3 10/10 34,316 MiB 0,000 s OK
#4 10/10 38,125 MiB 0,000 s OK
#5 10/10 36,105 MiB 0,000 s OK
#6 10/10 38,781 MiB 0,000 s OK
#7 10/10 37,598 MiB 0,000 s OK
#8 10/10 38,355 MiB 0,000 s OK
#9 10/10 34,766 MiB 0,000 s OK
#10 10/10 35,453 MiB 0,000 s OK

Ocenjevani program (Hierarhija.java):
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Array;

public class Hierarhija {
	public static void main(String[] args) throws Exception {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		String [] nm = read.readLine().split(" ");
		int n=Integer.parseInt(nm[0]);
		int m=Integer.parseInt(nm[1]);
		//System.out.print("1 ");
		for (int i = 1; i < n; i++) {
			if (i<m || i == n-1){
				System.out.print(1);
			}else{
				System.out.print(i+2);
			}
			if(i != n-1)
				System.out.print(" ");
		}
		
	}
}