git reimport
This commit is contained in:
17
dcj/tasks/broken_memory/broken_memory.java.2
Normal file
17
dcj/tasks/broken_memory/broken_memory.java.2
Normal file
@@ -0,0 +1,17 @@
|
||||
// Sample input 3, in Java.
|
||||
public class broken_memory {
|
||||
public broken_memory() {
|
||||
}
|
||||
|
||||
public static long GetLength() {
|
||||
return 16L;
|
||||
}
|
||||
|
||||
public static long GetValue(long i) {
|
||||
if (i < 0L || i >= GetLength())
|
||||
throw new IllegalArgumentException("Invalid argument");
|
||||
if ((12L ^ message.MyNodeId()) == i)
|
||||
return ((i * i) ^ 21L ^ (i + message.MyNodeId() + 1)) + 1L;
|
||||
return ((i * i) ^ 21L) + 1L;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user