Posts by m90
Python 3.7, 231 bytes class C:pass def g(): async def f():return;yield;await[3for()in()];nonlocal f if None: with lambda:3or 7and 8as q:del x elif False:raise else:assert 1is not 5 try:...
JavaScript, 43 bytes s=>"ABCDE"[Math.log2(s.slice(0,3)^255|8)^7] Try it online! Taking the first 3 characters of the string is always enough to include the first octet, while including at...
Python, 88 bytes import abc,code,fcntl,graphlib,json,pickle,cmd,errno,heapq,re,struct,csv,pwd,xml,sys,bz2 Attempt This Online! Requires a Unix-like operating system for fcntl and pwd, and at l...
Python 3, 7 distinct characters, 11 bytes True/-~True Try it online!
JavaScript, 48 bytes _=>[..."41506372"].map(x=>1e8/9+10**x|0).join` ` Try it online! The string "41506372" encodes the position of the queen in each row. 1e8/9 gives 11111111.1111......
JavaScript, 102 bytes s=>[...x=s.split``].concat(x.reverse()).reduce((l,c,i,a)=>l+` `+(a[i+1]?c+' '.repeat(i-1)+c:a.join``)) The first part creates the 'mirrored' string in an array. red...
x86-64 machine code, 27 bytes 6A D7 58 99 B1 10 48 D3 C0 48 AB C6 07 0A AE 80 C1 48 73 F2 FF C2 74 EC 88 37 C3 Try it online! Following the standard calling convention for Unix-like systems (f...
x86-64 machine code, 32 bytes A4 FF CA 6A 06 58 F6 F2 50 3C 03 59 51 74 08 AC F3 AA FF CA 75 F5 F3 66 AD 66 F3 AB 58 B0 07 C3 Try it online! Following the standard calling convention for Unix-...
Cracks Shaggy's answer: Jelly “¿×⁶ṆḶN{N=ȷṾ» Try it online!
x86-64 machine code, 36 bytes 31 C0 8D 48 0A FF C0 50 99 89 17 48 F7 F1 01 17 99 85 C0 75 F6 58 50 F7 37 58 85 D2 75 E7 AB FF CE 75 E2 C3 Try it online! Following the standard calling conventi...