Search
I'm leaving this answer here for any votes and discussion, but I no longer hold this opinion. I've posted a longer answer to explain why I've changed my mind After hearing about the filter devel...
I see the Sandbox as a vital part of challenge design. When I visit the Sandbox I'd like to be able to show only proposals that are not finalized, so I can focus feedback where it is needed. In th...
Given a grid of numbers, mark the concentric areas around nonzero elements (beacons) decreasing from the value of the beacon till 1. For example, here are some grids with a single beacon: Size 1:...
Japt, 6 bytes ßOpP±Q Test it ßOpP±Q ß :Recursive call Op :Output with trailing newline P :Empty string, initially ± :Append Q :Quotation mark
Vyxal, 5 4 bytes ¤{‹… Try it Online! This is so stupid and I love it Explained ¤{‹… ¤ # Push an empty string { # Forever: ‹ # Append a "-" to the top of the stack … # ...
JavaScript, 25 bytes Could be 21 but calling the function like that feels like cheating. (f=s=>f(s+=8,print(s)))`` Try it online! 22 bytes Didn't want to post this as my main solution a...
Python 3, 63 bytes print(str(eval(f"({input().replace(' ',')*(')})")).strip("()")) Try it online! Similar to hyper-neutrino's answer. Doesn't replace i by j and back, and uses f-string instea...
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...
Sidef, 25 bytes {eval .split.join(" * ")} {eval .split.join(" * ")} { } # Create anonymous code block .split.join(" * ") # splits on whitespace and joins with "...
Ruby, 56 bytes p *(1..).lazy.filter{_1%_1.digits.sum<1}.take(gets.to_i) Attempt This Online!
Python 3, 70 bytes def f(a): d={};r=[] for x in a:d[x]=d.get(x,0)+1;r+=[d[x]] return r Try it online!
Python, 98 bytes from itertools import* f=lambda n:[*islice(filter(lambda k:k%sum(map(int,str(k)))==0,count(1)),n)] itertools.count() generates integer numbers starting from 1, filter() fil...
Goruby, 38 bytes ->n{dw{$.+=1;$..mp{1.0/-~_1}.su<n};$.} This was not as much fun as I thought it would be, but it was fun enough to use once.
Factor, 46 bytes USE: math.statistics IN: h ALIAS: h histogram
Factor, 147 bytes USING: kernel math math.text.utils sequences ; IN: n : n ( n -- s ) 0 swap [ [ 1 + dup dup 1 digit-groups sum mod 0 > ] loop dup ] replicate nip ;
Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;
Factor, 95 bytes USING: kernel ranges sequences ; IN: r : r ( n q -- n ) [ [1..b] [ ] ] dip map-reduce ; inline