Search
Vyxal, 6, 5, 4 bytes Źe*∑ Try it Online! Takes input in the format coeffs, x Explained Źe*∑ Ź # Generate range [0, len(coeffs)) e # Calculate x ** [0, len(coeffs) (vectorising) ...
JavaScript (Node.js), 40 bytes f=(a,b,c=1)=>a.reduce((d,e)=>d+e*(c*=b)) Try it online!
Husk, 8 bytes S+s"S+s" Try it online! Basically Leo's original quine. It concatenates the string evaluated version of S+s to itself. So: "S+s" + "\"S+s\"" gives the original code.
Japt, 12 bytes ÊÆgX *VpXÃr+ Loops through the range of integers 0 to n-1, calculates each term, and sums. Try it
Codidact allows you to define three special types of tags: topic tags: these are treated as ordinary tags in all respects except that they're styled differently so they stand out. You can see...
Another approach, suggested by ArtOfCode in chat, is to create a close reason for "graduated" sandbox posts. When defining a close reason you can require a URL (this is what's used for duplicates)...
Raku, 19 bytes (*Z*(*X**0..*)).sum Try it online! Is it concerning that my solution is over 30% asterisks? Explanation ( ).sum # Get the sum of *Z*( ) # The inp...
Stax, 9 bytes Ç≈f♠É↔X+ö Run and debug it Explanation(Unpacked): wii{um|+;< w iterate until a falsy result is reached: ii push iteration number i twice {um map r...
Python 3, 49 47 44 35 bytes a=lambda x,y:+(x>=0)and(1+a(y,x-y)) Try it online! -3 bytes thanks to @Hakerh400 -9 bytes thanks to @Jo King Python 2, 50 bytes x,y=input() a=0 while...
Raku, 19 bytes {(|@_,*-*...0>*)-1} Try it online! { } # Anonymous code block ... # Create a sequence |@_ # Starting with the input ...
I nominate Jo King, as they were already voted as moderator by the community earlier. They have proven to be an active and trustworthy moderator, who is also a consistent contributor to the code g...
The task Given a positive integer as input, output tiled pyramids of this height. How? Let's say the inputted integer was n. From there, we output n lines of output, each having: A decreasing...
JavaScript (Node.js), 64 bytes for(n=0;101>++n;)console.log([['Fizz'][n%3]]+[['Buzz'][n%5]]||n) Try it online!
Regarding because the vast majority of all programs that were posted & highly up-voted there won't even compile on the most basic, compliant compiler for that language. Code Golf allows f...
goruby, 1 byte f Okay, so that's a bit unfair. 😂 The definition of f from golf_prelude.rb (which is what goruby embeds) is quite golfy in itself: def f(m = 100) 1.upto(m){|n|puts'FizzBuzz ...
We seem to ask a lot of questions in Meta, which sort of defeats the purpose of the Q&A category. Is it intended for subjective quesitons (of which this site gets few), or requests for tips, or...
It's for questions about golfing and challenges. From the comments underneath the original proposal: @Moshi from the discussion in 19th Byte it sounded like the community could have questions a...
It's for non-challenge questions. These might be general tips questions, questions about how to golf specific pieces of code, common golf paradigms, etc. Here are some examples from SE that might ...
Japt, 1 byte w Uh... yeah. Probably similar solutions for many other golf langs. Try it
C (gcc), 62 bytes main(){char b[99],*p=strchr(gets(b),0);for(;p-->b;)putch(*p);} This relies on the usual gcc extension abuse. It assumes that max user input is 98 characters + null term, si...
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...
Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if...
The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input A positive integer $N$. Your code must work for inputs up to and including 10, but may crash, error, or give ...