17 votes

Create a nibble shorthand

MATL, 12 7 bytes t~Pv1YG Input is a 4-digit binary vector. Example outputs (or try it at MATL Online!): Input [0 1 0 0]: ...
  • 101k
9 votes

Find The Real Solutions of a Cubic

R, 42 41 bytes function(c,a=polyroot(c))a[!Im(a)]/!!c[4] Try it online! Input is vector of d,...
7 votes

It's Just Rocket Science

Raku, 19 18 bytes *×(e**(11.2/*)-1) saved one byte by using the built-in constant e instead of the exp function Try it online! This is a "WhateverCode" ...
  • 5,876
6 votes

Create a nibble shorthand

Python 3 + NumPy and Pillow, 101 92 91 82 77 bytes import numpy as n,PIL.Image as p lambda x:p.fromarray(n.array([x,1-x[::-1]])) Takes in a NumPy array of ones and ...
  • 289
6 votes

Create a nibble shorthand

Ruby, 106 bytes Takes an integer as input and returns a PBM image. ...
  • 5,785
6 votes

Create a nibble shorthand

JavaScript (browser), 187 182 bytes ...
  • 147k
6 votes

Find The Real Solutions of a Cubic

MATL, 12 bytes 1)?G&ZQ&Zj~) Try it online! How it works ...
  • 101k
6 votes

Cut along the lines

K (ngn/k), 22 bytes {(&'+1,!2-1_=':x)_\:x} Try it online! 1_=':x For pairs of adjacent values: are they equal? ...
  • 55.2k
6 votes

Hexadecimal -> Binary Art

Python, 58 bytes while 1:print(f"{int(input(),16):08b}".translate(" X"*99)) Attempt This Online! Takes each hex code on a new line from input, ...
5 votes

It's Just Rocket Science

Factor, 24 bytes [ 11.2 swap / e^ 1 - * ] Attempt This Online! ...
  • 11.4k
5 votes

It's Just Rocket Science

JavaScript (ES7), 22 bytes Approximation Expects (ending_mass)(exhaust_speed). m=>s=>m*73130**(1/s)-m Try it online! ...
  • 171k
5 votes

Cut along the lines

Jelly, 8 bytes ITŒP‘œṖ€ A monadic Link that accepts a list of ones and zeros and yields a list of the valid partitions. Try it online! How? ...
5 votes

Cut along the lines

Factor + math.combinatorics math.unicode, 81 bytes ...
  • 11.4k
5 votes

Find The Real Solutions of a Cubic

Python, 143 134 133 bytes ...
5 votes

Cut along the lines

05AB1E, 6 (or 4?) bytes γ.œ€€˜ Try it online or verify all test cases. If we can use strings as I/O, this could be 4 bytes instead by replacing ...
4 votes

Create a nibble shorthand

Wolfram Language (Mathematica), 23 bytes A port of @Luis Mendo's MATL answer. Image@{#,Reverse[1-#]}&
  • 37.6k
4 votes

Cut along the lines

Curry (PAKCS), 40 bytes f(a++b:c:d)|b/=c=(a++[b]):f(c:d) f a=[a] Try it online!
  • 37.6k
4 votes

Cut along the lines

Brachylog, 5 bytes ḅ~ccᵐ Try it online! Takes a list through the input variable and generates a list of lists of lists through the output variable. ...
4 votes

Cut along the lines

Vyxal, 6 bytes ĠøṖvvf Try it Online! Port of @UnrelatedString's Brachylog answer.
  • 10.9k
4 votes

Find The Real Solutions of a Cubic

Both functions below take a polynomial in x. PARI/GP, 27 bytes p->if(#p>3,polrootsreal(p)) Attempt This Online! Returns <...
4 votes

Count Futoshiki row solutions

JavaScript (ES6), 110 bytes s=>(P=(a,j,p)=>a.map((v,i)=>!p|eval(p+s[j]+v)&&P(a.filter(_=>i--),j+1|0,v))+a?t:++t)([...s,t=i=0].map(_=>++i)) ...
  • 171k
4 votes

Find The Real Solutions of a Cubic

Vyxal P, 4 bytes hß∆P Try It Online! Good old built-ins. This may not work on some interpreters until the SymPy ACE ...
4 votes

Hexadecimal -> Binary Art

Vyxal, 10 8 bytes H‛ Xτ8↳⁋ Try it Online! -2 thanks to Steffan Port of Japt.
  • 3,775
4 votes

Hexadecimal -> Binary Art

Ruby -p, 40 31 bytes Takes input on stdin separated by newlines. $_=("%08b "%$_.hex).tr"01"," X" ...
  • 5,785
4 votes

Hexadecimal -> Binary Art

Excel (ms365), 74 bytes =BYROW(A1:A4,LAMBDA(a,CONCAT(IF(--MID(HEX2BIN(a,8),ROW(1:8),1),"X"," "))))
  • 141
3 votes

Carryless factors

05AB1E, 18 bytes LʒULε0sbv·yX*^}Q}à Try it online or verify (almost) all test cases (the largest two test cases are omitted because they'll time out). Explanation: ...
3 votes

Carryless factors

Java 8, 120 119 117 bytes ...
3 votes

Draw the Ukrainian Flag

Ruby + paint, 73 bytes You do need the paint gem installed, from rubygems: gem install paint Update: Thanks to manatwork for the ...
3 votes

Product of Divisors

Vyxal, 2 bytes Explanation: K # Gets the divisors of a number Π # Product of array Try it Online!
  • 199
3 votes

It's Just Rocket Science

Fig, \$11\log_{256}(96)\approx\$ 9.054 bytes *{^mE\x11.2 Try it online! Forgot to mention that it expects exhaust speed first and then mass. ...
  • 171

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