# Robbers

Robbers, your job is to find the slices of the corresponding cop's code.

## Scoring

The robber with the most cracks wins.

## Example

Take this code: iimmppoorrtt ssyymmppyy;;pprriinntt((ssyymmppyy..iisspprriimmee((iinnppuutt(())))))

The slice here is [::2], so the robber's post could look like this:

Cracked <somebody>'s answer
iimmppoorrtt  ssyymmppyy;;pprriinntt((ssyymmppyy..iisspprriimmee((iinnppuutt(())))))
The slice is [::2].

• ok............. Feb 9 at 19:04
• The unsliced program must be valid code, and your example isn't
– l4m2
Feb 9 at 20:44
• @l4m2 well, any suggestions? Feb 9 at 20:45
• @BgilMidol Suggestion: #iimmppoorrtt ssyymmppyy;;pprriinntt((ssyymmppyy..iisspprriimmee((iinnppuutt(()))))) Slice: [1::2] Feb 10 at 4:56

# Python 3, cracks Sisyphus's answer

input((input()[(-1)::1-1-1]))


Try it online!

Given by the slice c[-2158:-4855:-93]

I was initially surprised to find that there were no characters besides those used for input()[::-1]. The input() is a dead giveaway though and a brute force search reduced the input to a handful of possibilities. I then just looked at them individually until I found the correct code.

# Python 3, 181 bytes

OP

if   True:  print =eval ('  exit')# not  open   u
exit or  ( eval)('14')
# NO

open  or 15* id(  int( int(int (int( id(  print( print([111][:123][:55555-11111111111]))))))))#11;


The slice is simply program[::6], giving us:

irp=(input())
print(irp[::-1]);


Try it online!

-3::-14

# Python 3, 56 bytes

import sys as s


Try it online!

I admit that I used tools

• Ah was hoping it would trip people up for a little longer. What tools? Feb 10 at 4:20
• @jezza_99 Python
– l4m2
Feb 10 at 4:27

ż⇩İ


Generated from a slice of [1:15:6]

• Yep, intended solution. Feb 10 at 5:32

# Vyxal, cracks EmanresuA's second answer

ɖ‡\$"t¤+f


Given by the slice [11:33:3]

# Python 3, cracks AnttiP's answer

[53:586:4] results in:

def g(o):exec("".join(map(chr,map(sum,zip(map(ord,"ikbgm!bginm!\"T33&*V\""),99*[o])))))
x=0
class f:
def __del__(self):g(x)
y,x=f(),7


Try it online!

g increases each codepoint in "ikbgm!bginm!\"T33&*V\"" by its argument and then executes the resulting string as code. For o=7 this executes print(input()[::-1]).

When the program is done running the garbage collector deletes y, calling g(x) in the process.

• Wait, that was the solution? I had found it many times, but I glossed over it every time! Feb 14 at 17:02

# Vyxal, 3 bytes, cracks Aaroneous Miller's answer

wRh


Obtained from a slice of [13::-5]. Ngl you should have used that one quirk that only you know about because I know quite a few vyxal quirks too.

• You only need to get the last char Feb 9 at 22:25
• @Fmbalbuena But then the code won't reverse the input string... Feb 10 at 4:27

# brainfuck, Actually cracks l4m2

,[>><,]<[.<]


Try it online!

The slice is c[1::3]. And yes, I literally just bruteforce copy-pasted different slices to TIO, until I found a solution.

• Do you brute-force manually?
– l4m2
Feb 10 at 9:26
• @l4m2 here I thought that since the code is so short, I might as well do it manually, since there were only like 4 slices I had to check, so it was faster than to write a brainfuck interpreter and bruteforce automatically. But for example for Sisyphus's answer I wrote code. Feb 10 at 9:37

# Python 3, 72 bytes, cracks ths's answer

i=input();a=len(i);exec("for n in(i*8**9) [1:]:i=(i*a) [::~a]");print(i)


Try it online!

Slice used: code[4981:-201:67]

If you want to see the code finish within your lifetime a bit faster, change the 8**9 to 2 or any other positive even number.

• input a 5 letters string, the revert could be done in a few minutes on my laptop as I tested yesterday. So This should finish within your lifetime without changing anything.
– tsh
Feb 11 at 0:04

# Python 3.8 (pre-release), 45 bytes, Cracks Big Midol's second answer (new revision)

print(str(str(input()[::-1][::-1][::-1][:])))


Try it online!

Slice is code[145::2]

• Not intended, and there is a simpler slice. Feb 14 at 11:53

# Python 3, 43 bytes, cracks Bgil Midol's second answer (original version)

print(str(str(input()[::-1][::-1][::-1])))


Try it online!

Slice is s[40:-10:2]

Fastest crack in the west?

# Python, cracks Bgil Midol's third cop

[1011::3]


Try it online!

The result of this slice is:

exec("print.__call__(input()[::-1])")

• Nice work. There is a simpler version, though. Feb 14 at 17:31
• @BgilMidol It includes a typo, right? Feb 14 at 17:32
• I hope not...................... Feb 14 at 17:33