Files
java-competitive/dcj/other/pancakes1.java
2019-03-15 13:47:54 +04:00

26 lines
496 B
Java

// Sample input 2, in Java.
public class pancakes1 {
public pancakes1() {
}
public static long GetStackSize() {
return 6L;
}
public static long GetNumDiners() {
return 4L;
}
public static long GetStackItem(long i) {
switch ((int)i) {
case 0: return 0L;
case 1: return 0L;
case 2: return 0L;
case 3: return 2L;
case 4: return 2L;
case 5: return 3L;
default: throw new IllegalArgumentException("Invalid argument");
}
}
}