쉬운 문제였지만 원래는 아래처럼 풀고 싶었다는...
IntStream.range(0, cipher.length()) .filter(value -> value % code == code - 1) .mapToObj(c -> String.valueOf(cipher.charAt(c))) .collect(Collectors.joining());