Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Code challenges of all types. For questions about golfing, bowling, etc, use Q&A. For questions about this community, use Meta. To get feedback on a challenge before posting it, use Sandbox.

Filters (None)
75%
+4 −0
Generalized Sort

Challenge We all know and love the generic sort function, right? However, it only sorts based off one criterion - what if we want more? That's where you come in. Your task is to sort an array bas...

6 answers  ·  posted 5y ago by Moshi‭  ·  last activity 4y ago by radarek‭

code-golf sorting
75%
+4 −0
Implement Rule 110

[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...

1 answer  ·  posted 5y ago by celtschk‭  ·  last activity 5y ago by Moshi‭

code-golf cellular-automaton
33%
+0 −2
Tiny Turing-completeness

Your challenge today is to golf a program to interpret something Turing-complete. You may use any Turing-complete system for this so long as it is not the source language of the challenge - even a...

0 answers  ·  posted 5y ago by AndrewTheCodegolfer‭  ·  edited 5y ago by AndrewTheCodegolfer‭

code-golf turing-complete
77%
+5 −0
99 Shortened Bottles of Beer

Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ...

13 answers  ·  posted 5y ago by General Sebast1an‭  ·  last activity 5y ago by General Sebast1an‭

code-golf kolmogorov-complexity string
71%
+3 −0
Convert integer to English

Given a non-negative integer up to $999\,999\,999$, write it in English. The input number can be in any form other than English (though you'll typically want to use the native integer type of your...

3 answers  ·  posted 5y ago by celtschk‭  ·  last activity 5y ago by Moshi‭

code-golf number string
71%
+3 −0
Find good coalitions

As you might know, there were elections in Germany, and now the parties have to form a government coalition. Let's help them with it! A good coalition has the strict majority of seats (that is, mo...

2 answers  ·  posted 5y ago by celtschk‭  ·  last activity 5y ago by Moshi‭

code-golf
84%
+9 −0
Obligatory Quine Challenge

Rules Using your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- ...

9 answers  ·  posted 6y ago by ATaco‭  ·  last activity 5y ago by General Sebast1an‭

code-golf quine
71%
+3 −0
Encode and decode floating point integers

Imagine you have only one byte (8 bits) to store a value, but need to store values from $0$ to $4032$. Impossible, until you are also told that an error of 1/64 of the exact value does not matter. ...

2 answers  ·  posted 5y ago by celtschk‭  ·  last activity 5y ago by General Sebast1an‭

code-golf number
66%
+2 −0
Define a mathematical expression in English

Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifi...

1 answer  ·  posted 5y ago by General Sebast1an‭  ·  edited 5y ago by General Sebast1an‭

code-golf math string
77%
+5 −0
Recreate the Stack Overflow logo

Originally from Somewhere Else. I thought I'd continue making more drawing challenges here now that I discovered it. Make the Stack Overflow logo using the following criteria: The tray: ...

2 answers  ·  posted 5y ago by General Sebast1an‭  ·  last activity 5y ago by Anonymous‭

code-golf graphical-output
75%
+4 −0
The Ludic Numbers

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...

3 answers  ·  posted 5y ago by Razetime‭  ·  last activity 5y ago by General Sebast1an‭

code-golf sequence
77%
+5 −0
Decode periodic decimal fractions

Rational numbers in decimal representation can have an infinite periodic part. One common way to write this down is to repeat the periodic digits and then add three dots. Numbers without those thre...

2 answers  ·  posted 5y ago by celtschk‭  ·  edited 5y ago by General Sebast1an‭

code-golf number parsing
71%
+3 −0
My house is destroyed! Can you make me one?

Background A House of I I went on an adventure Grabbed resources and making deeds Like start to work on the materials To build the shelter I need It was a marvelous one At least in the eyes ...

10 answers  ·  posted 5y ago by General Sebast1an‭  ·  last activity 5y ago by Quintec‭

code-golf string
88%
+13 −0
Output 256 in many different ways

Challenge Write as many functions, programs, or snippets of code, that result in 256. Your score is the number of separate solutions submitted in an answer. The challenge? The characters used in ...

12 answers  ·  posted 6y ago by dzaima‭  ·  last activity 5y ago by snail_‭

alternative-scoring restricted-source highest-score
81%
+7 −0
In The Jailhouse Now

Challenge Given an integer n>=4 as input create an ASCII art "prison door"* measuring n-1 characters wide and n characters high, using the symbols from the example below. Example ╔╦╗ ╠╬╣ ...

6 answers  ·  posted 5y ago by Shaggy‭  ·  last activity 5y ago by snail_‭

code-golf ascii-art
75%
+4 −0
Tile pyramids on top of each other!

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...

9 answers  ·  posted 6y ago by Dion‭  ·  last activity 5y ago by emanresu A‭

code-golf ascii-art
71%
+3 −0
Multiply two strings

Given two strings, I define their product as follows: If any of the two strings is empty, the product is the empty string. If the second string consists of a single character, the result ...

6 answers  ·  posted 5y ago by celtschk‭  ·  last activity 5y ago by Hakerh400‭

code-golf string
75%
+4 −0
Generate Lewis Caroll's Jabberwocky

The task is to generate the text of Lewis Caroll's Jabberwocky. The text, quoted from Wikipedia, is as follows (I've replaced a non-ASCII character with ASCII, otherwise it's direct copy&paste...

4 answers  ·  posted 6y ago by celtschk‭  ·  last activity 5y ago by General Sebast1an‭

code-golf kolmogorov-complexity
80%
+6 −0
Beaver Code Decryption

Credit This challenge is taken with permission from https://www.mysterytwisterc3.org/en/challenges/level-1/beaver-code Description The encryption method is as follows: The plaintext is divided ...

6 answers  ·  posted 5y ago by rak1507‭  ·  last activity 5y ago by Shaggy‭

code-golf encryption decryption
60%
+1 −0
A chunk of symbols is a calculation

Challenge Create a program that takes input of a string and outputs an integer using the following calculation system: The string can only contain +, -, *, /, ^, ! (or a different character; ! ...

1 answer  ·  posted 5y ago by General Sebast1an‭  ·  edited 5y ago by General Sebast1an‭

code-golf math sequence decryption array-manipulation
71%
+3 −0
Longest Increasing Subsequence

Given an array of numbers, output the length of the longest increasing (not necessarily contiguous) subsequence. It is guaranteed that there are no duplicates in the array. For example, if the inpu...

4 answers  ·  posted 6y ago by Quintec‭  ·  edited 5y ago by General Sebast1an‭

code-golf
75%
+4 −0
Win a War (or at least a few battles)

You have an army of size $n$ that you need to split up to fight $k$ battles simultaneously against an opposing army $A$. In each battle, the army with the most troops present wins - no one wins a t...

2 answers  ·  posted 5y ago by Quintec‭  ·  edited 5y ago by General Sebast1an‭

code-golf optimization
71%
+3 −0
The Camelot Wheel

Given a musical key, output its number and letter on the Camelot Wheel (shown below). Input A musical key as a string, as shown on the wheel. The words "Sharp" and "Flat" may be replaced with s...

2 answers  ·  posted 6y ago by Quintec‭  ·  edited 5y ago by General Sebast1an‭

code-golf
66%
+2 −0
Golf me a polygonal loader

CGCC Sandbox, Codidact Sandbox Given three positive integers as input, animate an ascii-art polygonal loading symbol on the screen. Intro Using the first input $n$, Take one the following regul...

1 answer  ·  posted 5y ago by Razetime‭  ·  edited 5y ago by General Sebast1an‭

code-golf ascii-art animation
71%
+3 −0
Towering Cistercian Representation

SE Sandbox Link, Codidact Sandbox Link Inspired by this video. Given a positive integer, draw its Cistercian representation as ascii art. The Challenge Cistercian numerals are a decimal-based...

1 answer  ·  posted 6y ago by Razetime‭  ·  edited 5y ago by General Sebast1an‭

code-golf ascii-art
80%
+6 −0
Versatile self-printer

Using your languages of choice, golf a quine - a non-empty program taking no input and only outputting its source. Here, the win condition is your quine working in the most languages. It should be...

1 answer  ·  posted 5y ago by AndrewTheCodegolfer‭  ·  last activity 5y ago by General Sebast1an‭

quine number highest-score
77%
+5 −0
Are they abundant, deficient or perfect?

Abundant numbers are numbers which are less than their proper divisor sum. For example $18$ is abundant as $1 + 2 + 3 + 6 + 9 = 21 > 18$ Deficient numbers are numbers which are greater than the...

8 answers  ·  posted 5y ago by caird coinheringaahing‭  ·  last activity 5y ago by General Sebast1an‭

code-golf math number-theory
84%
+9 −0
Length of a Sumac Sequence

Heavily based on this closed challenge from SE. Description A Sumac sequence starts with two non-zero integers $t_1$ and $t_2.$ The next term, $t_3 = t_1 - t_2$ More generally, $t_n = t_{n-2} ...

9 answers  ·  posted 6y ago by Razetime‭  ·  edited 5y ago by General Sebast1an‭

code-golf math sequence
77%
+5 −0
Guess the language! (Cops' Thread)

ROBBERS' THREAD A famous cops-and-robbers challenge whose source shall remain unnamed is brought to Codidact. You are a cop. You should write a program in a "famous" (has an English Wikipedia/Eso...

16 answers  ·  posted 5y ago by AndrewTheCodegolfer‭  ·  last activity 5y ago by Shaggy‭

code-golf alternative-scoring cops-and-robbers
71%
+3 −0
Guess the language! (Robbers' Thread)

COPS THREAD A famous cops-and-robbers challenge whose source shall remain unnamed is brought to Codidact. You are a robber. Your goal is to find answers on this link which haven't been cracked an...

12 answers  ·  posted 5y ago by AndrewTheCodegolfer‭  ·  last activity 5y ago by m90‭

cops-and-robbers
81%
+7 −0
Backspace an array

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...

6 answers  ·  posted 5y ago by rak1507‭  ·  last activity 5y ago by Shaggy‭

code-golf
77%
+5 −0
Gamer Meme Creator

Challenge You will be given a string and an ascii art as input. The string must be placed above the ascii art, and centered based on its longest line. The text BOTTOM TEXT must be placed below...

4 answers  ·  posted 5y ago by Razetime‭  ·  last activity 5y ago by user‭

code-golf ascii-art string
75%
+4 −0
Three Number Monte

The Rules In this game, each round, every player faces off against every other player in a round robin format. In each match, players pick 3 positive integers that sum to 360. Let's say player 1 p...

2 answers  ·  posted 5y ago by Quintec‭  ·  last activity 5y ago by Moshi‭

number king-of-the-hill python
77%
+5 −0
Add two negabinary integers

About Negabinary Negabinary means base negative two (-2). That is, the $n$th place value is determined by $(-2)^n$. Negabinary numbers can be evaluated just like any other base system. For exampl...

3 answers  ·  posted 5y ago by Moshi‭  ·  last activity 5y ago by Shaggy‭

code-golf math
60%
+1 −0
Recreate the Server Fault logo

Make the Server Fault logo using the following criteria: The boxes' measurements: There are 3 columns of 5 boxes, with long ones at the left where the rest are regular. The following measure...

0 answers  ·  posted 5y ago by General Sebast1an‭

code-golf graphical-output
77%
+5 −0
Create a Sudoku

Write the shortest program that takes no input and outputs a Sudoku solution. For reference, a Sudoku solution is a 9x9 grid of digits where each column, each row and each of the nine 3x3 grids th...

4 answers  ·  posted 5y ago by AndrewTheCodegolfer‭  ·  last activity 5y ago by Shaggy‭

code-golf sudoku
81%
+7 −0
Evaluation order of an APL n-train

Description APL trains are a series of functions, that get applied to an argument in this way: (f g) x = f g x (f g h) x = (f x) g (h x) (a b c d e f) x = (a (b c (d e f))) x = a (b x) c (d x) ...

7 answers  ·  posted 5y ago by rak1507‭  ·  last activity 5y ago by Shaggy‭

code-golf
77%
+5 −0
Longest parallel lines

Note: This challenge was underspecified and bad, and as such I would not encourage answering it in the future. Challenge You will be given a single 2D boolean array $M$. You may take its dimensi...

1 answer  ·  posted 5y ago by rak1507‭  ·  edited 5y ago by rak1507‭

code-golf boolean