Search
Introduction The classic "Hello, World" challenge. What more can I say? Rules Program takes no input. Program outputs Hello, World! with an optional trailing newline. No other output is accep...
The fourth highest voted CGCC Meta question asks that SE increases reputation for questions. This is now status completed across the entirety of the Stack Exchange network. However, I notice that i...
Yes Challenges are what we need to survive Some of our users answer almost every new challenge, but that's not enough to keep codidact alive if there are no new challenges now and then. Challeng...
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 va...
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 ...
Don't require example code In general, I believe the decision should be on the challenge creator. Requiring it would be useless for certain types of challenges (kolmogorov-complexity or similar), ...
Welcome to the Codidact site for Code Golf (and other coding challenges)! We're glad you're here and we're excited to see what you will build. This community is starting "from scratch", without i...
Print or return this exact text: 0 0 0 0 1 0 0 1 1 0 0 1 2 1 0 ...
Given an positive integer $n$, return the least positive integer $k$ such that the $k$th partial sum of the harmonic series is greater than or equal to $n$. For example, if $n = 2$, then $k = 4$, b...
Code golf, being about exploiting things, often brings about many questions about edge cases. Since we don't want each challenge to have to deal with all problems again and again, it makes sense to...
Challenge Given an array of numbers return the cumulative count of each item. This is the number of times an item has occurred so far. Examples [1,1,2,2,2,1,1,1,3,3] -> [1,2,1,2,3,3,4,5,1,2]...
Challenge Given two strings a and b, return the shortest string s so that s starts with a and ends with b. (Inspired by https://chat.stackexchange.com/transcript/message/57816868#57816868 ) Exam...
JavaScript, 11 solutions !``<<!``<<!``<<!``<<!``<<!``<<!``<<!``<<!`` TIO 2**2**2*2**2**2 TIO 55555555555555555555555555555555555555555555555...
Japt, 10 11 13 15 solutions 256 Works as you would expect. 8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8 Subtracting negative numbers. 4**4...
Functions may take input via arguments and output via return value Functions may also use STDIN/STDOUT as they wish.
Given a list of strings(and optionally, their length) as input, weave the strings together. Intro Your goal is to mimic the WV operator in Pip. Take a list of strings and alternate between their ...
Your goal is to reverse an ascii string. Given a (optionally newline or null terminated) input, output your input in reverse order, optionally followed by a newline. Terminate afterward. Function...
Codidact's communities have a lot of great content that is helping people on the Internet. Our communities are small, though, and sustainable communities depend on having lots of active, engaged p...
Challenge idea taken from: Eliseo D'Annunzio Task Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, dou...
Looping counter Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk. Instead of the asterisk, any printable, non-whitespace character can be used. ...
Raku, 18 solutions 256 ٢٥٦ ۲۵۶ ߂߅߆ ২৫৬ ᠒᠕᠖ 𑄸𑄻𑄼 4⁴ 0x100 ord Q`Ā` '~~~'~^'LKH' 888-88-88-88-88-88-88-88-8-8 99+99+9+9+9+9+9+9+?9+?9+?9+?9 ($_=3333333)&&m|(3)(3)(3)(3)*|&&...
Challenge Output the following text: A ABA ABCBA ABCDCBA ABCDEDCBA ...
Outsourcing the answer to unofficial conditions An example would be a program to print the Fibonacci numbers: instead of actually computing them, it queries an API and gives back its output. Anoth...
Challenge A catalogue type challenge that simply asks: Given an integer n (where n>=0) as input return a truthy value if n is a perfect square or a falsey value if not. Rules You may take...
Challenge Given a list of integers >= 0 , check if all of them are equal. Tests [1,1,1,1,1] -> true [0,1,1,6,7] -> false [1] -> true [] -> undefined(you do n...