Skip to main content
4 of 4
cracked

Java (OpenJDK 8), 547 + 10 = 557 Cracked by Kevin Cruijssen

import static java.util.stream.Collectors.joining;
import java.util.stream.IntStream;

class Program {
    public static void main(String[] args) {
        System.out.println(new Program());
    }

    String getName(int x) {
        return x + " " + Integer.toHexString(x);
    }

    public String toString() {
        return IntStream.of(130, 14, 8613, 8784, 150, 151).mapToObj(x -> {
            String[] s = getName(x).split(" ");
            int n = (x % 13) % 5;
            return s[n % s.length];
        }).collect(joining(" "));
    }
}

Try it online!

I've never done this before and I see my entry is way longer than others. If that's not appropriate let me know and I'll delete it. Of course, Java is infamously verbose. I could also give a hint about what part of my program the characters were deleted from.

  • 10 characters removed
  • Target output: BREAK OUT FROM THE GUARDED AREA
  • Current output: 130 e 8613 8784 150 97

So, can the robbers break out from the guarded area?