git reimport
This commit is contained in:
36
dcj/tasks/number_bases/number_bases0
Normal file
36
dcj/tasks/number_bases/number_bases0
Normal file
@@ -0,0 +1,36 @@
|
||||
// Sample input 1, in Java.
|
||||
public class number_bases {
|
||||
public number_bases() {
|
||||
}
|
||||
|
||||
public static long GetLength() {
|
||||
return 3L;
|
||||
}
|
||||
|
||||
public static long GetDigitX(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 3L;
|
||||
case 1: return 2L;
|
||||
case 2: return 1L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitY(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 6L;
|
||||
case 1: return 5L;
|
||||
case 2: return 4L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitZ(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 0L;
|
||||
case 1: return 8L;
|
||||
case 2: return 5L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
}
|
36
dcj/tasks/number_bases/number_bases1
Normal file
36
dcj/tasks/number_bases/number_bases1
Normal file
@@ -0,0 +1,36 @@
|
||||
// Sample input 2, in Java.
|
||||
public class number_bases {
|
||||
public number_bases() {
|
||||
}
|
||||
|
||||
public static long GetLength() {
|
||||
return 3L;
|
||||
}
|
||||
|
||||
public static long GetDigitX(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 1000L;
|
||||
case 1: return 20000L;
|
||||
case 2: return 300000L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitY(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 40000L;
|
||||
case 1: return 500000L;
|
||||
case 2: return 6L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitZ(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 41000L;
|
||||
case 1: return 520000L;
|
||||
case 2: return 300006L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
}
|
39
dcj/tasks/number_bases/number_bases2
Normal file
39
dcj/tasks/number_bases/number_bases2
Normal file
@@ -0,0 +1,39 @@
|
||||
// Sample input 3, in Java.
|
||||
public class number_bases {
|
||||
public number_bases() {
|
||||
}
|
||||
|
||||
public static long GetLength() {
|
||||
return 4L;
|
||||
}
|
||||
|
||||
public static long GetDigitX(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 5L;
|
||||
case 1: return 3L;
|
||||
case 2: return 0L;
|
||||
case 3: return 0L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitY(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 5L;
|
||||
case 1: return 3L;
|
||||
case 2: return 0L;
|
||||
case 3: return 0L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
|
||||
public static long GetDigitZ(long i) {
|
||||
switch ((int)i) {
|
||||
case 0: return 0L;
|
||||
case 1: return 6L;
|
||||
case 2: return 0L;
|
||||
case 3: return 0L;
|
||||
default: throw new IllegalArgumentException("Invalid argument");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user