10
\$\begingroup\$

Cops thread
Robbers, your task is to crack a cops answer. Reveal the character that should be changed and what it should be changed to too. Please notify the cop if you cracked their challenge.

The robber winner is the user with the most cracks.
I will declare the winner cop and robber a week after this challenge is posted.

Example Submission

# Cracked [math's answer](http://example.com/17290/Change-a-character)

1[`a`|`b -> a

0[`a`|`b -> b

[Try it Online!](https://lyxal.pythonanywhere.com?flags=&code=1%5B%60a%60%7C%60b&inputs=&header=&footer=)
```
\$\endgroup\$

44 Answers 44

1
2
2
\$\begingroup\$

R, cracks Robin Ryder's 5th answer

PO=0
TA=TO =min(0 * 0 * 0, FALSE, 0 * 0 * 0)
if(T |TO&TA&TO)PO=18
LETTERS[PO]

Try it online!

Maybe another unintended crack...

I know nothing about R. I just know TRUE is truthy.

\$\endgroup\$
2
\$\begingroup\$

Cracked agtoever's answer

import operator as o
import inspect as i
a,d = 37,lambda n:n if len(str(n))==1else d(sum(map(int,str(n))))
for k, v in{d(sum(map(ord, n))): f for n, f in i.getmembers(o,i.isbuiltin)[::11]}.items():
 a+= int(v(a,k**2))
print(a)

Changed a space to a plus sign on line 5.

Try it online!

\$\endgroup\$
2
\$\begingroup\$

brainfuck, cracks Zachary Cotton's answer

++++++++++[>+++++++++++<-]>+?.-------.+++++.++++++.

Try it online!

Simple, really. We just have to print each byte decremented by one. An obvious way to do this is to replace a + with a no-op, right before the printing begins.

\$\endgroup\$
2
\$\begingroup\$

Cracked Bubbler's answer

13024e0 -> 13024

130b4e0 -> 69420

This is \$(4,14,0)_{130}\$.

Try it online!

\$\endgroup\$
2
\$\begingroup\$

APL (Dyalog Unicode), cracks Adám's answer

{(⍵ ⍵)(⍵ ⌶)(⍵ ⍵)},8

Try it online!

Because of how APL's parsing works, it is possible to get a meaningful result only when the first or second (...) is changed into a function, and it is only possible in the form of either (⍵X⍵) (using a dyadic operator X) or (⍵ X) (using a monadic operator X).

So I went through the built-in operators in turn until I hit (a monadic op that becomes an experimental function based on an integer code).

8⌶ is Inverted table index of. It takes "inverted tables" on its two sides, and computes "index of" rows of right arg in rows of left arg. ⍵ ⍵ is treated as a single-row, two-column table for this purpose, and the row to search is trivially found at index 1. Therefore the result is 1.

\$\endgroup\$
2
\$\begingroup\$

Labyrinth, cracks Bubbler's answer

99>
!!@

9, right, 9, down, !, print 99, up, 9, right, >, pop 9 and rotate the bottom row to @!!, down, !, print 0, left, !, print 0, left, @, end.

Try it Online!

\$\endgroup\$
2
\$\begingroup\$

Vyxal, 14 bytes, cracks A username's answer

‛⟑»:K:Ẋf∑$βS2Ẏ

Try it Online!

Probably not the intended solution, but this simply changes the compressed string from iraq to hours. The string itself doesn't matter, what matters is that it is a string made of 5 different characters. In fact, if you could change 2 characters, you could change it to Vyxal (₴ŀ) and it would still work.

\$\endgroup\$
1
\$\begingroup\$

Vyxal s, 13 bytes, cracks A username’s answer

khǍ⇩k•$Fk¹FsU

Try it Online!

\$\endgroup\$
1
\$\begingroup\$

Japt, cracks Shaggy's answer

@TwXµY *!ZøX ªX+YÑ}gB Bs

Try it here.

The trick here is to replace the unicode shortcut Ì (equal to gJ) with B (equals 11), breaking the chain and resulting in a comma operator instead. A nice brain teaser for sure.

\$\endgroup\$
1
\$\begingroup\$

Yggdrasil, 3 bytes, cracks Aaron Miller's answer

?.:

Try it online!

Honestly just tried random commands until I found something that worked. I realised the . had to be there, and the : printed it all, so the first character needed modifying.

\$\endgroup\$
1
\$\begingroup\$

brainfuck, cracks emanresu A's answer

.+[.[->+>+<<]+[>--<+++++]>++]

Try it online!

The unmodified program prints a single byte per iteration of the main loop. This means there are two ways to make it print more than the original two bytes:

  • Make one of the inner loops print the entire output in one run. This seems unlikely as the loops are quite simple.
  • Change the >+< in the end to get away from the zero cell. There are only a few changes that make some sense, so I got to >++ in a few attempts of trial and error.
\$\endgroup\$
1
\$\begingroup\$

><>, cracks Fmbalbuena's answer

 \   ÇÇÇÇÇÇÇÇ    
/!\; ÇÇÇÇÇÇÇÇ    
\n/!<ÇÇÇÇÇÇÇÇ    
 !   ÇÇÇÇÇÇÇÇ    
 >  ^ÇÇÇÇÇÇÇÇ    
\\2   \! \/! ~! \
 ÇÇÇ\ v! ~      /
 ÇÇÇÇÇ\'"a"\ÇÇÇÇÇ
 ÇÇÇÇÇÇÇÇ\\/ÇÇÇÇÇ

Try it online!

The changed character is the second backslash on the last line (previously a space), which sends the instruction pointer upwards to collect the string /ÇÇÇÇÇ\ before continuing along a path that removes the last two values from the stack and prints 199 (the character code of Ç).

\$\endgroup\$
0
1
\$\begingroup\$

Javascript (REPL?), cracks Nicolas B's answer

a=!![],a++,a+!![]

Replacing the += with +!.

\$\endgroup\$
1
\$\begingroup\$

Python 3, cracks grandBagel's answer

a=6
b=++a++a++++a++a
a=5*5/5**2
print(b*1-b)

Try it online!

The thing that makes the output a float is multiplying b by a, which has a value of 1.0. If we multiply b by 1 instead, the result is an int.

\$\endgroup\$
1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.