Top new questions this week:
|
Your task Given two positive integers \$x\$ and \$d\$ (such that \$d<x\$), output the 5th term of the \$d\$th difference of the sequence \$n^x\$ Example Let’s say we are given the inputs \$x=4\$ …
|
A bracelet consists of a number, \$\mathit{N}\$, of beads connected in a loop. Each bead may be any of \$\mathit{C}\$ colours. Bracelets are invariant under rotation (shifting beads around the loop) …
|
Given a set of substrings, such as [ca, ar, car, rd], it’s possible to create infinitely many strings by concatting them together. Some examples of this for the …
|
Based off a Scratch project The pen extension in Scratch has a set pen color to () block. The () is normally a color dropdown, …
|
Your program should take as input a number n that is greater than 0 and output a bar composed of n // 8 ▉ characters (U+2588), …
|
Your task Take a list of strings as the input, and output the maximum average ord. Example Given the list …
|
Greatest hits from previous weeks:
|
We all know that if you google the word “google” it will break the internet. Your task is to create a function that accepts one string and returns its length, in the fewest possible Unicode …
|
Background This is a standard textbook example to demonstrate for loops. This is one of the first programs I learnt when I started learning programming ~10 years ago. Task You are to print this exact …
|
Write the shortest code you can that produces an infinite output. That’s all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code …
|
I think the question as above is clear, but just in case: Write a full program (not just a function) which prints a positive base 10 integer, optionally followed by a single newline. Qualifying …
|
What general tips do you have for golfing in JavaScript? I’m looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. “remove …
|
As I’m applying for some jobs whose job advert doesn’t state the salary, I imagined a particularly evil interviewer that would give the candidate the possibility to decide their own salary …by “…
|
Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes …
|