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 »
Sandbox

Testing ground for new challenges. Post here to get feedback, edit to adjust, and then when you're ready, post in Challenges.

Filters (None)
33%
+0 −2
💥 CHALLENGE: Find a Collision in Leviathan v3.1 (Deterministic)

The Context: I have officially deprecated SHA-2 and SHA-3. This decision stems from a critical security breach I witnessed: a virus that infected my system using forged digital signatures that wer...

posted 3d ago by KaoruAK‭  ·  edited 1d ago by KaoruAK‭

50%
+0 −0
Digits with subsets of unique population size

Output a sequence of digits, with no 2 subsets of the digits 0 to 9 having equal population size. Input There is no input for this challenge. Output A finite sequence of digits from 012345678...

posted 1y ago by trichoplax‭  ·  edited 1mo ago by trichoplax‭

50%
+0 −0
Cod golf: condense your shoal

For this challenge your answer is a string containing 255 fishes as subsequences, and your score is the length of that string in bytes. Rules To be a valid answer: Your string must include at ...

posted 3y ago by trichoplax‭  ·  edited 5mo ago by trichoplax‭

50%
+0 −0
Awkward Ordinals [FINALIZED]

Now posted: Awkward Ordinals Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the conventional ordinal names, although...

posted 9mo ago by trichoplax‭  ·  edited 9mo ago by trichoplax‭

60%
+1 −0
Digit balanced numbers [FINALIZED]

Now posted: Digit balanced numbers Does a number have balanced numbers of distinct digits? That is, do the number's digits appear with equal frequency? Input A positive integer N. N will ha...

posted 10mo ago by trichoplax‭  ·  edited 10mo ago by trichoplax‭

50%
+0 −0
Expand a greyscale/colour hex code [FINALIZED]

Now posted: Expand a greyscale/colour hex code Consider a type of hexadecimal colour code that supports shorthand for both greyscale and colour: A 6 digit code is interpreted as 2 digits for ...

posted 1y ago by trichoplax‭  ·  edited 12mo ago by trichoplax‭

71%
+3 −0
Display a Progress Bar [FINALIZED]

Now finalized: Display a Progress Bar The goal of this challenge is simple: given a ratio of whole numbers, output a 50-character long progress bar representing the ratio. Rules Input Your pr...

posted 1y ago by Sylvester‭  ·  edited 1y ago by trichoplax‭

71%
+3 −0
Source with the whole alphabet in order of appearance [FINALIZED]

The challenge is to write as short a source as possible, where the English alphabet (in alphabetical order from top to bottom) "abcdefghijklmnopqrstuvwxyz" is a subsequence of the source code. The...

posted 1y ago by Lundin‭  ·  edited 1y ago by trichoplax‭

60%
+1 −0
Product of polynomials modulo 2 in integer representation

Your task is to implements the product of polynomials modulo 2 $(\mathbb F_2[x]$) in integer representation. Background The field $\mathbb F_2$ represents the integers modulo 2, or equivalently, ...

posted 1y ago by celtschk‭  ·  edited 1y ago by celtschk‭

50%
+0 −0
3D compass point from 3D coordinates

Given 3 dimensional (3D) Cartesian coordinates (x, y, z), output the 3D compass point that comes nearest to describing the direction from the origin. Definitions Directions In reality, the direc...

posted 3y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

60%
+1 −0
Plain ​​spheres

Given a list of spheres, output an image. Produce a greyscale orthographic (parallel projection - no perspective) ray caster, that renders only plain grey spheres with no lighting. Input A lis...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
Multiplicative perfection [FINALIZED]

Now posts: Multiplicative perfection Given a positive integer, indicate whether it is the product of its proper divisors. Integers equal to the product of their proper divisors can be found on ...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
How many odd digits? [FINALIZED]

Now posted: How many odd digits? Given a positive integer, count its odd digits. Input An integer from 1 to 999,999,999, inclusive. Output The number of odd digits in the input. Tes...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

66%
+2 −0
Net​​ or​​ not? [FINALIZED]

Now posted: Net​​ or​​ not? Given a hexomino, indicate whether it is a net of a cube. Input A 6 by 6 grid containing exactly 6 filled squares. The 6 filled squares will be in a single edge ...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
Substring factor [FINALIZED]

Now posted: Substring factor Does a positive integer have a substring as a factor? Input A positive integer. Output One of 2 distinct values to indicate whether the input has a factor ...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

60%
+1 −0
Most isolated of 3 points [FINALIZED]

Now posted: Most isolated of 3 points Given 3 points, output one that is separated from its nearest neighbour by the largest distance. Input 3 distinct points (that is, no 2 points are in th...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
Hex ​​​detector [FINALIZED]

Now posted: Hex ​​​detector Given an integer from 1 to 1000, indicate whether it is a centered hexagonal number (also known as a hex number). What is a hex number? The hex numbers can be visua...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

66%
+2 −0
Fibonascii Squares [FINALIZED]

Finalized: Fibonascii Squares The Challenge Your job is to, given input positive non-zero integer $n$, output an ASCII representation of the tiled Fibonacci squares up to the $n$th number of th...

posted 1y ago by Sylvester‭  ·  edited 1y ago by trichoplax‭

50%
+0 −0
Round trip stones [FINALIZED]

Now posted: Round trip stones $N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection f...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
The 50 substrings that validate any string of Roman numerals [FINALIZED]

Now posted: The 50 substrings that validate any string of Roman numerals Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves ...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
12-hour time is weird [finalized]

Posted: https://codegolf.codidact.com/posts/291018 Your mission for today, should you choose to accept it, is to write a simple 12-hour clock calculator. Your input will always be in the form of a...

posted 2y ago by honnza‭  ·  edited 2y ago by honnza‭

50%
+0 −0
Fibonacci numbers with no consecutive digits [FINALIZED]

Now posted: Fibonacci without consecutive digits Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input A non-negative integer. Output The Nth nu...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

50%
+0 −0
Print virtual fractions / 2-adic fractions / Modular multiplicative inverse [FINALIZED]

Now posted: Print virtual fractions / 2-adic fractions / Modular multiplicative inverse TL;DR Print this values (or an extension of them): 1 43691 52429 28087 36409 35747 20165 61167 6...

posted 2y ago by H_H‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Arbitrary angle wrapping wordsearch

Sandbox Would you change anything about the test case format? Are there any more edge cases to add to the test cases? Should words that use the same grid position more than once be c...

posted 3y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

50%
+0 −0
Shortest representation in generalised Roman numerals [FINALIZED]

Posted Given an integer, find its shortest representation in generalised Roman numerals. Since there is more than one way to generalise, only the definition shown below applies to this challenge. ...

posted 3y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

50%
+0 −0
Single character Roman numeral [FINALIZED]

Now posted: Single digit Roman numeral Given a single character, which is a valid Roman numeral, output its value. Values There are 7 valid single character Roman numerals, with the following va...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Borromean coprimes [FINALIZED]

Now posted: Borromean coprimes Given 3 positive integers, indicate whether they are Borromean coprimes. Definition 3 positive integers are called Borromean coprimes if both of the following ar...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Is it part of the mandelbrot set? [FINALIZED]

Now posted Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedl...

posted 2y ago by H_H‭  ·  edited 2y ago by trichoplax‭

50%
+0 −0
A word suggester [FINALIZED]

Now posted: Word suggesting Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At f...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Probability of rolling all 6 dice faces [FINALIZED]

Now posted: Probability of rolling all 6 dice faces 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...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
Expected value of highest dice rolled [FINALIZED]

Now posted: Expected value of highest dice rolled You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) o...

posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
Caesar shift cipher [released]

Introduction What is ROT13? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic interpretation of ROT13 is i...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

50%
+0 −0
99 Shortened Bottles of Beer [released]

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

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
A chunk of symbols is a calculation [released]

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

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
My house is destroyed! Can you make me one? [released]

Background 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 of mine And w...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Make my value binary [released]

Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
Stairs? Stairs! Stairs. [released]

Challenge Make a program that takes input of an integer that's $n > 1$ and print out a staircase using a specific character for stair basing (hashes (#) for demonstration; you can use spaces,...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Abbreviate everything [released]

Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Reverse your quine [released]

Challenge Write a program that prints its reversed self. For example, if your code is foo() Then it'll output: )(oof Make sure that the quine is a valid one, as defined here: No cheatin...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

75%
+4 −0
Collatz conjecture; Count the tries to reach $1$ [released]

Background Check out this video on the Collatz conjecture, also known as A006577[1]. 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 ...

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Define a mathematical expression in English [released]

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

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Operation "Find The Operator" [released]

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

posted 4y ago by General Sebast1an‭  ·  edited 2y ago by trichoplax‭

66%
+2 −0
Evaluate a univariate polynomial [FINALIZED]

Challenge Given a list of n numbers and x, compute $a + bx^1 + cx^{2} + zx^{n-1}$, where a is the first value in the list, b is the second, etc. n is at most 256 and at least 0. The input value(s...

posted 5y ago by moony‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Given the preorder and the inorder of a tree, output the postorder [FINALIZED]

Definitions A binary tree is either a null (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tre...

posted 5y ago by Hakerh400‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Output 256 in many different ways [FINALIZED]

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

posted 5y ago by dzaima‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Generate Lewis Caroll's Jabberwocky [FINALIZED]

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

posted 5y ago by celtschk‭  ·  edited 2y ago by trichoplax‭

60%
+1 −0
Write a Deadfish Interpreter[FINALIZED]

A rewrite of this question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following commands: ...

posted 5y ago by Razetime‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Shuffle a subset of a list [FINALIZED]

Posted Idea shamelessly stolen from caird and rak1507 Shuffle a subset of a list of unique, positive integers with uniform randomness, given the indices of that subset. For example, given the lis...

posted 4y ago by user‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Add two negabinary integers [FINALIZED]

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

posted 4y ago by Moshi‭  ·  edited 2y ago by trichoplax‭

81%
+7 −0
Reduce over the range [1..n] [FINALIZED]

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

posted 4y ago by user‭  ·  edited 2y ago by trichoplax‭