Hot answers tagged

33

Python 3, cracks @nthistle's answer 𝓹𝓻𝓲𝓷𝓽(𝓬𝓱𝓻(97)+𝓬𝓱𝓻(98)+𝓬𝓱𝓻(99)+𝓬𝓱𝓻(100)+𝓬𝓱𝓻(101)+𝓬𝓱𝓻(102)+𝓬𝓱𝓻(103)+𝓬𝓱𝓻(104)+𝓬𝓱𝓻(105)+𝓬𝓱𝓻(106)+𝓬𝓱𝓻(107)+𝓬𝓱𝓻(108)+𝓬𝓱𝓻(109)+𝓬𝓱𝓻(110)+𝓬𝓱𝓻(111)+𝓬𝓱𝓻(112)+𝓬𝓱𝓻(113)+𝓬𝓱𝓻(114)+𝓬𝓱𝓻(115)+𝓬𝓱𝓻(116)+𝓬𝓱𝓻(117)+𝓬𝓱𝓻(118)+𝓬𝓱𝓻(119)+𝓬𝓱𝓻(120)+𝓬𝓱𝓻(121)+𝓬𝓱𝓻(122)+𝓬𝓱...


24

Python 3, Score: 81, Cracked X = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'*,./:;<=>?@[]^_`{|}~ Not terribly interesting since it has such a high score, but this should be somewhat difficult to crack... Clarification: This is in fact a full Python 3 program, running it locally with python3 print_x_out.py produces the above ...


21

Unreadable, 111 bytes '"'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'&...


18

///, 1 byte A Try it online! As it’s 1 byte, simply outputting the source code gives the average. /// just outputs the source code unchanged if it doesn’t contain any / characters, so almost any ASCII character works in place of A


15

Malbolge, 17 bytes (=<;:9876543210TA Try it online! Test the code average Explanation: (=<;:9876543210TA ( Copies the value pointed by register d to register d. (d = 0 so it copies the '(' ASCII value) =<;:9876543210 Succesive calls to the crazy operation to update the value in ...


13

Python 2, 8 bytes print"Y" Try it online! Average Character Verified


13

HQ9+ Family, 1 bytes Q Believe it or not, there are challenges can be solved by HQ9+ in 2020.


13

Python 3.7, 128 bytes, cracks jez's answer import sys class A:__class_getitem__=chr class B:__class_getitem__=ord class C:__class_getitem__=sys.stdout.write C[A[B["'"]+1]] Try it online!


11

Python 3, score ... 48 29 20 +1,eval(bytes([57])) A completely different approach from the last 2 versions (and also result in manageable generated program). Check out the revision history for some (possibly) interesting ideas. Given an arbitrary Python program: print(1) it can be transformed, without changing the behavior: exec("print(1)") ...


11

APL (Dyalog Unicode) and lots of other languages and REPLs, 1 byte 4 Try it online! However, more interesting is: '''' Which actually evaluates to the single quote. Try it online!


11

Javascript (Browser), score: 3, Cracked (\) Simple, but hard. My solution:


11

Befunge-93 (FBBI), cracks @Ethan Chapman's (new) answer >g::g- :::+:+:+:+:++\::+:+:+:+:+:+\::+::+::+::+::+::++++++\::+::+:+:+:++\: v v +::+:+::+::+::\+++++::+:+::+::+:::\+++::+::+:+:+::\++++::+::+:+:+:: < > +++\:::+:+::+:+::++++\::+:+::+:+::+++\:::+::+:+:+::++++\::+::+:+:+: v v \+++:+::+::+:+::\+++:+::+::+:+::\++::+:+:+:+::\+++::+:+:+:...


10

brainfuck, 15 bytes +[+++++>+<]>++. Try it online! Requires an 8 bit interpreter as it uses modulo 256 arithmetic. Average is 53.4. Outputs 5 which is character 53.


10

C (gcc), 179 176 157 152 149 bytes -3 -3 bytes thanks to ceilingcat -19 bytes thanks to xibu L,M,P=543452769;f(s,t)typeof("")s,t;{M=M>>8|*s<<24;t=(M|' '|L<<24)-P?t:memcpy(t-3,(typeof(0)[]){P,M|=1<<29,P,M,P},20)+19;L=M;(*t=*s)&&f(s+1,t+1);} Try it online! Assumptions ASCII Little-endian sizeof(int) == 4 sizeof(...


10

Python 3.7, Score: 1 - Cracked X = ( Same base rules as nthistle's challenge above: must be a full script, run with python3 print_x_out.py. I believe it's not possible to use wacky non-ascii substitutes for ( in a Python 3 script, but I may be wrong (I haven't tried them all). My solution does not use that approach, anyway, and the intention is that yours ...


10

Ruby, cracks @histocrat's answer send("ev"+("%x"%(5+5))+"l",send("ev"+("%x"%(5+5))+"l",("%d"%(4-3))+("%d"%(4-3))+"2"+("%f"%2)[4-3]+"chr")+"uts \""+send("ev"+("%x"%(5+5))+"l",("%d"%(4-3))+("%...


10

Haskell, cracks Ad Hoc Garf Hunter's answer Hard version: main=print[p|r<-[[n..m]|m<-[a|a<-['n'..],init[a|a<-['n'..],'|'<a,[a,']','<']<[a,']'..]]<[a],[a,']','<']<[a,']'..]],n<-[a|a<-init=<<[init['n','a'..]],a<'-']],p<-r,p<','||','<p,p<'.'||'.'<p,p<'['||'['<p,p<'|'||'|'<p,p<'<'||'&...


9

Haskell, Score 81, Cracked " !#$%&()*+/0123456789;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\^_`bcdefghjkloqsuvwxyz{}~" This one might be a little difficult. Stuff you don't have You don't have newlines or spaces (my intended answer doesn't use any whitespace at all, however I can't get it to print some of the funkier whitespace characters so you are free to ...


9

Mornington Crescent, Score: 4, Cracked X = myHp You may have survived the 7UBES, but the real challenge begins now. Face me in battle! First, allow me to rid us of some distractions. Four lines are closed. Over half of the special stations are unavailable. In spite of this ruin, victory remains possible. Even for the likes of you, but it won't come easily... ...


8

Raku, 4 bytes *~^* Try it online! Raku has a built-in operator for XORing strings, along with string AND, OR and bitshift. This is a Whatever lambda that takes two parameters.


8

COW, 11 8 bytes BOOM!! Try it online! or verify the average. Explosively prints 0 (average 48.375), using the fact that all non-instructions (B, !!, and the two newlines) are no-ops. 6 bytes I'm retaining the 8-byte version above because it's my favourite, but here's a 6-byter thanks to @JoKing: OOM! (Note the code ends with two tabs.) Also prints ...


8

Java (JDK), cracks user's answer class T{public static void main(String... args){if(System.out.printf(""+(char)92+(char)91+(char)59)==null){}}} Try it online! This was pretty fun. First, we need a main method without the square brackets, which can be done with the standard main method definition replacing the square brackets with ellipsis, and ...


7

Jelly, 4 bytes O^/Ọ Try it online! Takes input as a list of the two strings, e.g. ['abcde', '01234']. How? O # ord: cast to number (automatically vectorizes) ^/ # Reduce by XOR. XOR automatically applies to corresponding elements and pads as desired to work if the two strings are different lengths Ọ # chr: cast to character (vectorizes once ...


6

perl -Mfeature=say,bitwise -nl, 22 bytes $.%2?($;=$_):say$;^.$_ Try it online! This is way more characters than I first hoped for. If it weren't for those pesky newlines, the 9 character say<>^.<> would do. How does it work? For odd input lines, it saves the current line of input (without the trailing newline due to the -n and -l switches) into $...


6

Perl 5 + -p -040 -l, 35 bytes This script contains unprintables so the link is to a Bash program that builds the script and runs the tests. $s= ~'...';s/^$s$/$s $& $s $& $s/gi Try it online! Explanation Uses Perl s///ubstitution operator, but necessitates that and is built outside due to the source restriction. To create and, the $s is set to ~&...


6

Javascript, score: 83, cracked? (the crack is not executable like /path/to/interpreter file.js, unlike my solution, but I don't think that matters a lot) I only know one Javascript implementation where my intended solution works. !"#$%&'()*,-./0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_`abcdefghijklmnopqrstuvwxyz In this implementation, only five ...


6

C (gcc), cracks Noodle9's answer Output: #_ep Since printf, put and write are not allowed I had to use inline assembly to send data to stdout. The string "\043\137\145\160" encodes the desired output in octal notation. int main() { long r; asm ("int $0x80" : "=a" (r) : "a" (4), "b"(1), "c"(&...


6

R, cracks Dominic van Essen's challenge The string to print is 0123456789+-*/^!&|%`()$ My (circumvoluted) solution is: "<"=sum a=T<F aa=T<T aaa=T<aa aaaa=T<aaa aaaaa=T<aaaa aaaaaa=T<aaaaa aaaaaaa=T<aaaaaa aaaaaaaa=T<aaaaaaa aaaaaaaaa=T<aaaaaaaa "["=example S=Syntax[,,,T] A=Arithmetic[,,,T] Q=Quotes[,,,T]...


6

J, cracks @xash's answer (97)1!:2(4) (117)1!:2(4) (46)1!:2(4) Try it online! Gonna be honest, not entirely sure why this works. I was trying to learn J syntax and playing around with a few things, and I found that you can just send ASCII values to STDOUT and they get automatically converted into characters. Neat!


6

JavaScript (Babel), cracks my pronoun is monicareinstate's answer The answer is 74291 bytes using only the characters [+|>], which is unfortunately too large to post here, so I've provided a GitHub repository to verify the solution. git clone https://github.com/patrickroberts/xchars-pipeline.git cd xchars-pipeline npm install npx babel-node index.js ...


Only top voted, non community-wiki answers of a minimum length are eligible