Search
Factor, 46 bytes USE: math.statistics IN: h ALIAS: h histogram
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!
Ruby, 56 bytes p *(1..).lazy.filter{_1%_1.digits.sum<1}.take(gets.to_i) Attempt This Online!
Sidef, 25 bytes {eval .split.join(" * ")} {eval .split.join(" * ")} { } # Create anonymous code block .split.join(" * ") # splits on whitespace and joins with "...
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...
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...
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...
Japt, 5 bytes k eUâ Try it
Japt, 6 bytes ßOpP±Q Test it ßOpP±Q ß :Recursive call Op :Output with trailing newline P :Empty string, initially ± :Append Q :Quotation mark
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...
C (gcc), 117 bytes b,r;f(char*s){char*p=s;for(;*p;p++)*p-=47+7*(*p>57),b=b<*p?*p:b;if(b<2)return p-s;for(;*s;s++)r*=b,r+=*s-1;return r;} Try it online!
A chequer board (also spelt "checker board" in some places) is an 8 by 8 grid of squares alternating between 2 colours. Check whether a provided pattern could be a region of a chequer board. The c...
C (gcc), 46 bytes printf(char*);main(){printf("Hello, World!");} printf(char*);(14 bytes) is better than #include <stdio.h>\n(19 bytes)
Fig, 5 bytes The actual score is $5\log_{256}(96)\approx$ 4.116 bytes. The leaderboard only likes ints in the header. (J,Q0 -1 char thanks to Seggan Try it online! Fractional byte lang creat...
Fig, 2 unique, 2 total H! Try it online! Halves the negation of the empty string when no input is given.
Given a potentially recurring binary string, output the number it represents, as a fraction in lowest terms. The notation used in this challenge for recurring digits is non-standard. An r is used ...
For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author? Lets say the input is a string, how long a string has to be ac...
Vyxal, 12 bitsv2, 1.5 or 2 bytes øṘ Try it Online! or Try the entire test suite Bitstring: 000101111100 Very simply a built-in
Your task is to write a program $p$ which outputs a string $s$ with the same length as $p$, where $s \neq p$. If I remove the $n$th byte from your program to get program $q$, then either $q$ outpu...
C, 30 + 1-4 byte f(m){f(printf("%0*i\n",m,0));} Has this limitations: counter stops working at INT_MAX or at stack overflow. Needs a input value to indicate on which line we start. 0 starts...
Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the suggested word is simp...
C (gcc), 42 bytes c;f(i){c++<8&&(printf("%d",i&1),f(i>>1));} Try it online! Binary output version.