git reimport
This commit is contained in:
26
dcj/other/pancakes2.java
Normal file
26
dcj/other/pancakes2.java
Normal file
@@ -0,0 +1,26 @@
|
||||
// Sample input 3, in Java.
|
||||
public class pancakes2 {
|
||||
public pancakes2() {
|
||||
}
|
||||
|
||||
public static long GetStackSize() {
|
||||
return 7L;
|
||||
}
|
||||
|
||||
public static long GetNumDiners() {
|
||||
return 5L;
|
||||
}
|
||||
|
||||
public static long GetStackItem(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 0L;
|
||||
case 1: return 1L;
|
||||
case 2: return 3L;
|
||||
case 3: return 2L;
|
||||
case 4: return 1L;
|
||||
case 5: return 3L;
|
||||
case 6: return 0L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user