33
\$\begingroup\$

Cops challenge

The Robbers' Challenge

  1. Find a vulnerable answer. That is, an answer which hasn't been cracked yet and which isn't safe yet either.

  2. Crack it by figuring out its language. That is, find any language in which the given program is a valid program (subject to the rules outlined in the Cops' Challenge above). It doesn't matter if this is the language the cop intended.

    Once you have found a working language, post an answer to the Robbers' thread and comment below the Cop's answer. If you don't have enough reputation to comment, say this in your answer and someone will comment for you.

The output format must be the same as the cop's intended solution in order to constitute a valid crack.

Every user only gets one guess per answer. This includes telling other people the answer, or hints towards your guesses. You must not crack your own answer (obviously...).

The user who cracked the largest number of answers wins the robbers' challenge. Ties are broken by the sum of bytes of cracked answers (more is better).

Good luck Robbers!

\$\endgroup\$
3
  • 23
    \$\begingroup\$ Important: Please be nice to TIO and don't just (write a script or manually) test all of the languages there. TIO is very busy already. \$\endgroup\$
    – user202729
    Commented Feb 7, 2018 at 11:37
  • 12
    \$\begingroup\$ I feel like the whole Cops/Robbers thing is backwards. Shouldn't the Robbers be hiding their programs and Cops be trying to bust them? \$\endgroup\$
    – Jo King
    Commented Feb 8, 2018 at 6:29
  • 4
    \$\begingroup\$ @JoKing ... just PPCG terminology. There is no reason to be incompatible, and there is absolutely no reason to change all the past cops-and-robbers ---questions--- challenges. \$\endgroup\$
    – user202729
    Commented Feb 8, 2018 at 10:19

145 Answers 145

3
\$\begingroup\$

brainfuck, posted by internet_user

c="[,]"[1];f=[eval("str.format")][0];p="1+1"
late=eval(p)+sum([((-1)>1)+0+(0>1)+0+1<<4]);ml=160>>2
ml*=([(7-1)<7+1+1+3*(9>1)]<[(5-1>1+1+1>2)+2+1<<2]);xn=42>>1;ss=sum(eval(f("[10-5{}(4<7)+7+8{}(6>8)]>>>["[:24],c,c)))#]<<<
lol=(7<42)+late+ml+xn+ss#[
m=-9;g=(str((2>m)+x) for x in range(lol));print("\n".join(g));1 < 2 or e#]

Try it online!

\$\endgroup\$
3
\$\begingroup\$

brainfuck, posted by user71546

// Calculate the digit sum of 2^64
var sum = 1 + 8 + 4 + 4 + 6 + 7 + 4 + 4 + 0 + 7 + 3;
var b = " "[2 > 1 && (sum = sum + 7 + 0 + 9 + 5 + 5 + 1 + 6 + 1 + 6) + 0 < -88];
var c = "a" > [2 < +3 ? console.log(sum) > -1 : 0];

Try it online!

\$\endgroup\$
0
3
\$\begingroup\$

SuperCollider, posted by Nathaniel

for(1,100,"% "postf:_)

Offline verification

$ sclang test.sc
*** Welcome to SuperCollider 3.8.0. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
\$\endgroup\$
3
\$\begingroup\$

Befunge-93, posted by osuka_

shovv fRom-0to*1E#' <iostream
?>e[10]++;B:12\;g\=`||(
@. >!1:then.do+^\x61@
:^A&>#+:$#<math>eaa$q

The carefully aligned v>^< suggested a 2-D language. A little experimenting showed that it works in Befunge-93 (MTFI): Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ That was quick! I figured that if anything, it would be the directionals that would give it away. I realized I could've abused vertical and horizontal conditionals (especially since an underscore looks really innocuous), but that was only after I posted \$\endgroup\$
    – osuka_
    Commented Feb 8, 2018 at 13:05
3
\$\begingroup\$

Symbolic Python, posted by MD XF

_=+([]==[]),
__('_+=-~_[~([]>[])],;'*-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~([]==[]))

Try it online!


The []==[] part makes me think it's some dynamic typing language with [] means something and == compares equality. Probably Javascript.

Try running the program in Javascript gets the error message

ReferenceError: __ is not defined

Ok. So what is defined? The line right above that contains _=, so _ is defined. It can only be some language such that two adjacent _ are treated as two different tokens.

Spaced does not work because ==.

\$\endgroup\$
3
\$\begingroup\$

Lost, posted by Jo King

/@<<<<<<  >>>>>>@\
v       \/       v
%       ^^       %
?      \  /      ?
>1+:455*  * -+?^:>
?v     /^^\     v?
^      \oo/      ^
^ \!/ ______ \!/ ^
^  v  \____/  v  ^
^<<<          >>>^

Try it online!

\$\endgroup\$
0
3
\$\begingroup\$

Wise, posted by Jo King

   ~-<<:>>-~
||<<<:<:>:>>>||
   |[: ?-~]|

Try it online!

\$\endgroup\$
3
\$\begingroup\$

1+, posted by ivzem

11+""*""*"+""+++1\1<#":1+^"/^"\^<#:

There's an interpreter here.

\$\endgroup\$
3
\$\begingroup\$

Whirl, posted by Jo King

+------------------------------------------------------------+
|111111111111111111111111111111111111111111111111   $\       |
|000110011000111100011100100/010 0010 %p0-d% 0+{10000/111    |
|111000100111110001001000011 / 1111000100111110001001  frick |
|000 {01111110001(( 001111100010010000 1111110001()\ () !    |
|001111100010010000111 111000100111 1100010010000111111000100|
|111110001001(0000111)11100010011111!}000100100001111110001  |
|0011111|_0001001000011111100010011111 000100100001111110 001|
|001111100010010000111#1110001 001111100010010000111111000100|
|11111 H) /!00010010000111 1/1 100/0100111110001001000       |
| 011111100  & 01001111100010010000  111111000100111110001001|
|@  00001 11111000100111110 00100100001 111110 001001 111    |
| 1000 1001000011 11110 00100111110001001000011111100010  the|
|the 01111 100010010000111 111000 1001 111100010010 00011111 |
|1000100JO   1111100 010010000111 +=   11100010 011 11 KING  |
| 1000100100001 11111000100111110001 "0010000111111000100111 |
|110001001000011 11110 00100127  : 1111000100100 001   1     |
|11   11000100  11111000100100001111110001001111100010010000 |
|11111100 a  01001111100010  010000111111   000100111        |
| 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1|
|00 01 00 10 00 01 11 11 10 00 10 01 11 11 00 01 00 10 00 01 |
| 111 110 001 001 111 100 010 010 000 111 111 000 100 111 110|
|0010 0100 0011 1111 0001 0011 1110 0010 0100 0011 1111 0001 |
| 00111 11000 10010 00011 11110 00100 11111 00010 01000 01111|
|110001 001111 100010 010000 111111 000100 111110 001001     |
| 0000111 1110001 0011111 0001001 0000111 1110001 0011111    |
|00010010 00011111 10001001 11110001 00100001 11111000       |
| 100111110 001001000 011111100 010011111 000100100 001111110|
|0010011111 0001001000 0111111000 1001111100 0100100001      |
|                      ^1111100010^                          |
|0 111110001001000011111100010011111000100100001111110001    |
|0011111000100100001111110001001111100010010000111111000100  |
|  111110001001000011111100010011111000100100001111110001001 |
|   111100010010000111111000100111110001001000011111100010   |
| 0111110001001000011111100010011111000100100001111110001    |
|0011111000100100001111110001001111100010010000111111000100  |
|  1111100010010000111111000100111110001001000011111100010011|
|11100010010000 111111000100111110001001000011111100010011   |
|11100010010 00011111100010011111000100100001111110001001    |
|11110001+ 00100001111110' 001001111 10001001000011111100010 |
| 011111000100100001  1111100 010011  11100010010 00011      |
|1111JKL5 000100111110   0010010000   11111  1000   10011    |
|111 J 6700010010000111111^& E 00010011 L  11100 L 0 Y? bin  |
|100[print()100001111110   -001001111100010010000111]  111000|
|100 not 1111100 BRAIN010010000 FU1111 11000100CK  111110001 |
| rk:start 0010 0001111110001001 1111  0001001000011111100   |
|0100111110 dckx 001001  000011111  1000100111  11000100 help|
|100001 111110001001111100010010000111111000 1001111100010010|
|000-[111111000100??11111000100100001>1111100 {x=0-100}px    |
|111110001 00100001  11111000100111110 0010010000111111000100|
|1111 1000100100 +++001111  110001 0011111000  100100001 1111|
|100010  011111000100100001111<-1100010011111000100 10000111 |
|111 eval('\b00010011111000100100001111')-110001001--1111000-|
|1001000011]1111000100111110001001000011111100  010011111000 |
|10 +01>0000111 1  1 100 01001 1111 0001001 000011--1111  -  |
|0001001111100010010000111111000 1001111100010010000111111000|
|10011[111-0 0 01001000011 11110001001111100  010   010000111|
|111000 <100  1111100+010010 00 0.11111100010011111000100100 |
|001111110001001111100010>0100001111110001001111100010010000 |
|011000101010010101010111000000101011001]010100101010000 1010|
|111111111111111111111111111111111111111111111111111111111111|
+------------------------------------------------------------+

This had quite a few red herrings. I tried Nhohnhehr, Brain-Flak, PATH, Cardinal and SNUSP before leaving this feeling a bit stumped. Then dylnan's mention of Fortuna reminded me of Whirl.

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Beatnik, posted by MD XF

aAaAa>>u<<TWELVE>>ooooooooo<<if(i < 100); print("oOOoOooOoOoO");
done:
    PutNumbersFromOneToOneHundredInclusiveFunctionZD<GOTO 100>;
    executes(print); language(CPlusPlusE::PublicUI); 

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Super Stack!, posted by MD XF

1 1 if pop dup output 1 add dup 101 swap sub fi
\$\endgroup\$
3
\$\begingroup\$

O, posted by MickyT

['d#,;r]o

Online interpreter: https://o-lang.herokuapp.com/

I recognized it immediately by the o at the end.

\$\endgroup\$
1
  • \$\begingroup\$ yeh, the o definitely was a give away :) \$\endgroup\$
    – MickyT
    Commented Feb 11, 2018 at 6:26
3
\$\begingroup\$

BrainCurses, posted by Conor O'Brien

' !'d[:-%_%]

There's an interpreter here

\$\endgroup\$
3
\$\begingroup\$

I, posted by Adám

1i101

Try it online!

\$\endgroup\$
0
3
\$\begingroup\$

ecpp + C (gcc), posted by MD XF

#rule control_flow foreach
#rule control_flow in
#def `foreach a in b..c:` for (int a = b; a <= c; a++)

int main(void)
{
    int a = 1, b = 100;
    foreach i in a..b:
        printf("%d ", i);
}

Try it online!

\$\endgroup\$
3
\$\begingroup\$

Deadfish, posted by Number Basher

ibbfibbfsdbfsibfbffsfbfbi
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! Oh do! 
DONE... THIS IS ALL I HAVE TO SAY... 
Oh do! 

Try It Online!

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

dc, posted by moonheart08

0[1+pd100>a]salax

Try it online!

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

Locksmith, posted by Conor O'Brien

import java.util.Random;
interface Main{
  public	static void  main(String[]args){
for(int	i  	=0; i  <		90*  11; i ++)
System. out.println(i);
f(   	 	7);
g();
}
public static 	int f(int n){System.out.println(n);if(n<=0)return+n&3;
else return f(	n/7)*6	+7*f(n-5)+7;
}
public static void g(){
Random k=new Random(45);
String j="YmlULmxZXERFZmNvbg==";
int m;
for(int i=m=0;i<121;i++){
m+=j.charAt(0)+j.	charAt(i&1)+k.nextInt();
}
System.out.println(k.nextInt((int)Math.pow(7201,19))^6^m);
}
}

Try it online!

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

APL (Dyalog Unicode), posted by Uriel

+\100\1

Try it online!

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

MATL, posted by Stewie Griffin

False T
For nnz(100) T+1 
'cout <<' T
)o:
bux bux Q
hu

Try it online!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I'm, curious... Do you know how it works? \$\endgroup\$ Commented Feb 7, 2018 at 19:42
  • \$\begingroup\$ @StewieGriffin I'm not really familiar with MATL, but parts of the code, i.e. nnz and T, reminded me of MATL programs I've seen on PPCG. \$\endgroup\$
    – ovs
    Commented Feb 8, 2018 at 10:23
  • 1
    \$\begingroup\$ I guess nnz has been in explanations. z alone is equivalent to nnz(x) in octave. \$\endgroup\$ Commented Feb 8, 2018 at 10:36
2
\$\begingroup\$

Implicit, posted by MD XF

(].[]%<100@9)&

Try it online!

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

Brain-Flak, 664 bytes, posted by Christopher

for(each num in #1/#100)
(
    do #pointOfNum(num)
Push (#pointer@#num)
if(result(pointer@(num/pointOfNum(run2)+#diff)))
while(each num of pointer@num)
do
(ITS GO TIME!)
DO THE MATH
)
def fun add{
while add #(point@100)
})
def {
do@#point()
})
open{ref}add(42))
do
{SAY IT TO THE NAND})
{
push why1998@point
})
if(output!ready
(push@#out
{buy})
onGler<@spoin>
pushet)
<Divmod@point@uf2X3>
discov def n{
<div@23>
point@(4524#f34)
(@#do(@3h)
{point*723
numdif}
)#huCX5DBP^h~0_GG1<h32X542P[18F18h42X%AAP[h!.X%OOS`M a@<euws
[give@point
(for@point13)])
div<pointmod>
divide((42/9
{
over@point27
})
[pointto(27)]
giv@12)}
div<mod>
def run{
pointOfnum
fun@#(23)
why1998
}

Try it online!

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

Jolf, posted by Conor O'Brien

Lazy!~1

Try it online!

I wasn't sure what this was so I decided to dive down deeper into some of the languages you developed!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Good job! Nice to see someone looking at my languages ;D \$\endgroup\$ Commented Feb 8, 2018 at 20:51
2
\$\begingroup\$

Self-modifying Brainfuck, posted by Jo King

v<[-=0lfn_v#:-d<]
<[/_>]/@-0>_?!:^"d.

Try it online!

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

False, posted by MD XF

1a:[a;101-][a;.a;1+a:" "]#

An online interpreter can be found here.

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

Lily, posted by tfbninja

for i in 1...100:{print(i)}

Try it online!

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

JavaScript, posted by Colin Robertson

n=1;while(n<101){console.log(n);n++;}

Try it online!

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

Hy, posted by DLosc

(defn !(&optional(> 1))(if(< > 101)(do(print >)(!(inc >)))))(!)

You can try it e.g. if you manually type the code into this interpreter.

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

Gambas, posted by Christopher

Public Sub Main()
Dim num as short
For num = 1 To 100 Step 1
    print num  
Next
End 
'1-100.print
\$\endgroup\$
2
\$\begingroup\$

2sable, posted by DevelopingDeveloper

$ 123
@(%
#ZZ
&^0
*i*j F=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101
$ 123
@(%
#ZZ
&^0
*i*j

Try it online!

\$\endgroup\$

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.