Search
Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested...
Challenge Given an array consisting of positive integers and 0s, return it with 0s acting like backspaces. Leading backspaces do nothing, and more backspaces than elements also does nothing. Cre...
Python 2, 76 bytes i=27 while~i:print' '*i+' '.join(`min(i,j,27-i-j)`for j in range(28-i));i-=1 Try it online! Computes the digit in row i from the bottom, position j as min(i,j,27-i-j). F...
As we have set up communities here on the Codidact network we've been appointing temporary moderators. Ultimately, of course, we want each community to choose its own moderators; we've been doing ...
The Sandbox is intended to be a place for feedback, right? If I lost rep because my sandboxed idea wasn't good, I'd be pretty angry about that. Don't have the Sandbox modify reputation; instead us...
Challenge Cause the currently running program to receive the SIGSEGV signal (on Linux or other *nix systems) as fast as possible. What it does with the signal doesn't matter as long as it receives...
C, 5 bytes main; This exploits the fact that uninitialised globals live in the .bss section, and that section is not executable. So any attempt to execute code there, regardless of content, wil...
Ahead, 3 bytes SW@ S Slurp entire input to stack W Write entire stack @ End Try it online!
Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is odd...
JavaScript (Node.js), 74 70 bytes Works for any number of dimensions. f=(a,z=[])=>a.map?.((b,c)=>z.push(...f(b).map(a=>[c,...a])))?z:a?[z]:z Try it online! (TIO uses an old version ...
Jelly has an atom called untruth, which when given indices, creates an array with 1s at those places: [2,4] → [0,1,0,1]. You are required to perform the inverse of this. Given a 2D boolean array, ...
C, 8 solutions Standard C, no extensions. 1 solution snippet per line: "llll"[3]^33^333 4*4*4*4 5555-555-555-555-555-555-555-555-555-555-55-55-55-55-55-5-5-5-7-7 6666/26 (int){8<...
Brain-Flak, 12 bytes {({}<>)<>}<> Try it online! # (Implicitly) Read characters from STDIN and place them all on the active stack # While the top of the active stack is no...
The answer header must specify the minimum implementation & environment required If there are multiple implementations of a language and an answer depends on features of one, it must be specif...
Task I often need to find the factorial of a number or the sum of all numbers up to a number when cheating on math tests. To help me with this, your task is to write $F$, a generalized version of ...
Challenge A Niven number is a positive integer which is divisible by the sum of its digits. For example, 81 -> 8+1=9 -> 81%9=0. Your task is to find the first n Niven numbers, given n. Te...
Programs may take input from prompts from the GUI For Mathematica, JS, Matlab, et. al. this is the closest thing they have to STDIN.
Using the lack of features in a language to trivialize the problem For example, in a challenge which requires your program to check if it is connected to the internet, using Brainfuck to always pr...
Functions may take multiple arguments with currying For some languages like Haskell this is almost a necessity, as only one-argument functions exist and multi-argument functions are implemented wi...
Interpreting the challenge too literally If the challenge asks that you print the nth prime given input n, a program printing the nth prime given input n isn't allowed.
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. The program must figure out how to get the 2 fir...
Make a new post If they are completely different solutions, I would say they should be judged separately.
An integer is called square-free if it is not a multiple of a perfect square other than 1. For example, 42 is square-free, but 44 is not because it is a multiple of the perfect square 4 = 2². Your...
You are a low-level censor working for the Ministry of Media Accuracy. Part of your job is to make sure that certain words don't appear in publications. Every morning you get a fresh stack of next...