Posts by emanresu A
Vyxal s, 5 bytes 2=A[5 Try it Online! You're not the only one who can abuse flags, Shaggy... 2= # Foreach, is it equal to to? A[ # If all are 2 5 # Push a 5. # (s flag) sum...
JavaScript (Node.js), 67 60 bytes o=>r=>Buffer(o).map(c=>c%32<26&c>64?(c%32+r)%26+c-c%32:c)+'' Try it online! o=>r=> // Define a function taking o an...
Vyxal, 4 bytes K∆²a Try it Online! Outputs 0 for square-free, 1 for not. K # Factors ∆² # Is perfect square a # Any true?
Vyxal, 3 bytes k∨↔ Try it Online! ↔ # Keep chars from k∨ # vowels
Vyxal D, 26 bytes 0Ȯ(n«ƛ√J«`›‹²…`ĿĖD₈=$0<∨[0 Try it Online! 0 # Push 0 Ȯ(n # Iterating over the input «ƛ√J«`›‹²…`Ŀ # Translit...
Vyxal C, 6 bytes ƛ\/*øṀ Try it Online! ƛ # 1...n map \/* # That many / øṀ # Ascii art mirror # (C flag) Join by newlines and center
Vyxal J, 12 bytes ḣmėƛ÷꘍ṘǏ;⁋?m Try it Online! ḣ # Head extract (x[0], x[1:] ) m # Mirror the ToS (x[1:]) ė # Zip with 0...length ƛ ; # Map... ...
Vyxal R, 1 byte R Try it Online! Function must be inserted in the header. The R flag casts integers to ranges when an integer can't be used. R is the builtin for 'Reduce list by function', an...
Vyxal D, 10 bytes `:qpṘ`:qpṘ Try it Online! `:qp `:qp # Standard quine structure Ṙ Ṙ # Reverse Or, more interestingly... Vyxal D, 31 bytes `q\`:Ė#\`+øm`:Ė#Ė:`mø+`\#Ė:`\q` Try ...
Vyxal, 7 bytes ɾĖ∑?≥)ṅ Try it Online! Vyxal has arbitrary-precision rationals, so this will never run into precision errors. ṅ # Find the first integer -----) # where ∑ # sum of...
Vyxal, 12 bytes bṠ:₍gGvc†Tİ∑ Try it Online! İ # Index into input T # Indices where v # For each Ṡ # Sum of b # Binary digits ₍gG ...
Vyxal jṀ, 11 bytes ƛd‛_/$꘍⁰d↳Ḣ Try it Online! ƛ # Map 0...n to... ‛_/ # '_/' $꘍ # And append... d # Double # (Implicit input) $꘍ ...
JavaScript (Node.js), 52 bytes (A,...c)=>A.sort((a,b)=>c.map(z=>z(a,b)).find(x=>x)) Try it online! A golf of the reference code. If we can assume there will be no ties, 47 is po...
Vyxal, 13 bytes \#*,‹(⇩\#꘍ṘǏ, Try it Online! \#*, # Print a line of # ‹( # n-1 times... ⇩\#꘍Ṙ # n-2 spaces before a hash Ǐ, # Append a hash and print
Vyxal ṪR, 3 bytes (⁰℅ Try it Online! ( # N times... ℅ # Generate a random integer between one and... ⁰ # First argument