New answers tagged

7 votes

Highlight a Wordle guess

K (ngn/k), 30 bytes Takes the guess as first argument and the secret as second. Returns a list with -1 for not highlighted, 0 for yellow and 1 for green. ...
user avatar
  • 55k
7 votes

Highlight a Wordle guess

K (ngn/k), 32 31 bytes {g-(x~':x{x_x?y}\y@>g)@<>g:x=y} Try it online! Minor reordering and syntax change from the original answer below (and it returns ...
user avatar
  • 64.8k
6 votes

Highlight a Wordle guess

K (ngn/k), 52 46 45 bytes {@[g;&[#'(=x)^\:&g;#'y]#'y:(=y)^\:&g:x=y;2+]} Try it online! -1 byte from ngn (thanks!). Starting with a list of positions ...
user avatar
  • 471
1 vote

Super Mario 64 RNG

SM83/Z80, 24 bytes Input in bc, output in bc. (For Z80, change the 8th byte to 0A; this is ...
user avatar
2 votes

Super Mario 64 RNG

MIPS III, 68 60 bytes 308800ff 00084200 00884026 00084a02 310a00ff 000a5a00 01695825 000b1042 004a1026 316c0001 15800002 38427e00 38429e74 03e00008 00000000 ...
user avatar
  • 11.2k
1 vote

Super Mario 64 RNG

Python, 55 bytes lambda n:(q:=n>>8^(n:=n&255))//2^n<<7^n^57460^q%2*40564 Attempt This Online! I'm late to the party, but yet another port of @Arnauld's JavaScript answer.
user avatar
  • 1,423
1 vote

Super Mario 64 RNG

Batch, 58 bytes @cmd/cset/a"q=%1>>8^(n=%1&255),q/2^n<<7^n^57460^q%%2*40564 Another port of @Arnauld's JavaScript answer.
user avatar
  • 146k
5 votes

Super Mario 64 RNG

C (gcc), 53 bytes q;f(n){q=n>>8^(n&=255);n=q/2^n<<7^n^57460^q%2*40564;} Try it online! Port of Arnauld's JavaScript answer.
user avatar
  • 18.6k
3 votes

Super Mario 64 RNG

Retina 0.8.2, 173 bytes ...
user avatar
  • 146k
6 votes

Super Mario 64 RNG

05AB1E, 34 23 22 bytes ₁‰`Ðr^‚₁β2‰`Ž$×*Žâ∊α^^ -12 bytes thanks to @CommandMaster Try it online or verify all test cases. Explanation: 05AB1E lacks bitshift ...
user avatar
23 votes

Super Mario 64 RNG

x86 32-bit machine code, 21 bytes 89 C8 30 C4 86 C4 D1 E8 73 04 66 35 74 9E 66 35 74 E0 30 C8 C3 Try it online! Uses the ...
user avatar
  • 7,306
10 votes

Super Mario 64 RNG

JavaScript (ES6), 45 bytes n=>(q=n>>8^(n&=255))/2^n<<7^n^57460^q%2*40564 Try it online!
user avatar
  • 169k
2 votes

Tile stacking with ■ and □

JavaScript (ES6), 198 bytes ...
user avatar
  • 169k
5 votes

Tile stacking with ■ and □

Python 3, 237 bytes ...
user avatar
  • 30.7k
3 votes

Tile stacking with ■ and □

Python3, 714 bytes: ...
user avatar
  • 3,296

Top 50 recent answers are included