Search
Vyxal 3, 26 bytes ÷50×.5+:'|×'[p$51$-'-×']W“ Vyxal It Online! ÷50×.5+:'|×'[p$51$-'-×']W“...
C (gcc), 147 151 bytes #define L(X)X(+,a+b)X(-,a-b)X(*,a*b)X(/,b&&a/b)X(%,b&&a%b)X(^,pow(a,b)) #define M(o,d)printf("%s",d==c?#o" ":z++==5?".":""); z;s[99];f(a,b,c){L(M)} Tr...
[Rule 110] is a Turing complete cellular automaton. It is defined as follows: Take as initial value a sequence of symbols that's infinite to both sides, which consists only of two different symbol...
C (gcc), 133 131 bytes f(p,s){char*t="Hole in one\0Albatross\0Eagle\0Birdie\0Par\0Bogey\0Double bogey\0Triple bogey";for(--s?s+=5-p:0;s-=!*t++;);puts(t);} Saved two bytes thanks to m90 in the...
Ruby, 110 106 bytes Fixed capitalization and refactored for -4. ->p,s{d=s-p s<2&&"Hole in one"||%w[Albatross Eagle Birdie Par Bogey Double Triple][d+3]+(d>1?" bogey":"")} Att...
Japt, 26 25 20 bytes ;Bg4mUn ¤Í¤ùT8 qT ÎÊ Try it -5 bytes thanks to @Shaggy
JavaScript, 43 bytes s=>"ABCDE"[Math.log2(s.slice(0,3)^255|8)^7] Try it online! Taking the first 3 characters of the string is always enough to include the first octet, while including at...
Questions The most important thing to gain traffic in a code golf site is having good questions. SE code golf has 12,718 questions(and counting), and many people are still actively posting questio...
Embed ESCR, 6 unique characters, 19 bytes [/ [*] [+ [*] [*]]] Each [] pair of brackets encloses an in-line function. The first token in a function is the function name, and subsequent tokens, if...
Ruby, 7 unique, 12 bytes $$.fdiv$$+$$ Ruby, 8 unique, 13 bytes: $$.fdiv $$+$$ Ruby, 9 unique, 22 bytes: "i".size.fdiv"ii".size Ruby, 9 unique, 24 bytes: Math::E./Math::E+Math::E
C (gcc), 8 7 unique cos(cos-cos)/(cos(cos-cos)-(-cos(cos-cos))) Try it online! -1 unique character thanks to @orthoplex
Scala, 52 bytes Stream.from(1).filter(x=>x%(x+"":\0)(_+_-48)<1).take Try it in Scastie! Woo, 3 deprecation warnings! (okay, one of them could be fixed but I like to live dangerously) St...
Python, 45 bytes I am not a Python guy at all, so I'm quite proud of this. I'm sure, though, there's something simple I could be doing to save myself a few bytes! lambda n:int(n,int(max("1"+n),...
Command-line arguments may be used as input instead of stdin Languages/systems that support reading input from command-line arguments may use those as input instead of reading from stdin.
Challenge Given the roots of a polynomial (that is, the $x$ values where the polynomial evaluates to zero), as an array of real numbers, return the polynomial's coefficients. That is, given real ...
JavaScript, 28 bytes f=n=>n-1&&-~f(n%2?n*3+1:n/2) Try it online!
The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The...
Use the unpacking * instead of list If you want to convert an iterator/generator into a list, use the * operator instead of using the list function, e.g. Instead of list(iterable) Use [*iter...
Haskell, 13 bytes 2!2=5 x!y=x+y Try it online!
I think "Dangerous" could perhaps stay on. "Outdated" would probably be better off replaced with "Invalid" or something of that sort. I don't think we need "Works for me" or an analog of it at all:...
Given a sequence of letters, output only the vowels. Input A sequence of letters This may be a string or any ordered data structure of characters (provided it is consistent between inputs) Th...