text
stringlengths
180
608k
[Question] [ *This is the robber's thread of a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge. You can view the cop's thread [here](https://codegolf.stackexchange.com/questions/207558)* A pretty common beginner style question is to print some string, but,...
[Question] [ An *uninteresting number* (which I totally didn't make up only for this challenge) is created like this: > > 1. Take a positive integer N > 2. Create a new number O by adding the digits of N at the end of N > 3. The final uninteresting number is O\*N > > > For example for N=12: > > 1. O = 1212 > 2...
[Question] [ # Challenge You must output the current time continuously (until cancelled by an interrupt), once every second, by any of the following means: * It must be in 24-hour or AM/PM format. + If it is the former, it must be spaced out with colons (i.e. 15:47:36). + If it is the latter, it must be spaced ou...
[Question] [ ## Introduction We all know and love our Fibonacci sequence and have seen a myriad of challenge on it here already. However, we're still lacking a very simple case which this answer is going to provide: Reversed fibonacci! **So given `F_n` your job is to find `n`.** ## Specification ### Input Your inpu...
[Question] [ # Binary to decimal converter As far as I can see, we don't have a simple binary to decimal conversion challenge. --- Write a program or function that takes a positive binary integer and outputs its decimal value. You are not allowed to use any builtin base conversion functions. Integer-to-decimal func...
[Question] [ ## Challenge Given a positive integer, determine whether it is a triangular number, and accordingly output one of any two constant, distinct values. ### Definition A [triangular number](https://en.wikipedia.org/wiki/Triangular_number) is a number that can be expressed as the sum of consecutive positive...
[Question] [ Given an input of a program written in [oOo CODE](http://esolangs.org/wiki/OOo_CODE), output the BF code that it represents. Here is a short description of how oOo CODE works: * First, all non-alphabetic characters are removed (everything not in the range `A-Za-z`). For example, take the program `PROgR...
[Question] [ Given an input string `S`, print `S` followed by a non-empty separator in the following way: * Step 1: `S` has a `1/2` chance of being printed, and a `1/2` chance for the program to terminate. * Step 2: `S` has a `2/3` chance of being printed, and a `1/3` chance for the program to terminate. * Step 3: ...
[Question] [ **Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/7197/edit). Closed 7 years ago. [Improve this question](/po...
[Question] [ One of many unique features of the [Malbolge](https://esolangs.org/wiki/Malbolge) programming language is its highly unintuitive `OP` operator, referred to only as "op" in the documentation and source code but popularly known as the "crazy" operator. As described by Ben Olmstead, the creator of the lan...
[Question] [ Graham's number \$G\$ is defined in this way: \begin{align\*} u(3,n,1) & = 3^n \\ u(3,1,m) & = 3 \\ u(3,n,m) & = u(3,u(3,n-1,m),m-1) \end{align\*} Then, \begin{align\*} g\_1 & = u(3,3,4) \\ g\_2 & = u(3,3,g\_1) \\ g\_3 & = u(3,3,g\_2) \\ & \vdots \\ G & = u(3,3,g\_{63}) \end{align\*} You are given that...
[Question] [ Write a program/function that returns the vote count of its own Stack Exchange answer at the time of its execution. * Your program/function may access this page ([codegolf.stackexchange.com/questions/82609](https://codegolf.stackexchange.com/questions/82609)) off the internet, however: * Your program/f...
[Question] [ This challenge was [inspired by a question on Mathematica.SE](https://mathematica.stackexchange.com/q/30405/2305). Say you've got a nested list/array of some arbitrary structure (the lists at each level don't necessarily have the same length). For simplicity, we'll assume that the nodes are non-negativ...
[Question] [ A positive integer \$k\$ is a **Loeschian number** if * \$k\$ can be expressed as \$i^2 + j^2 + i\times j\$ for \$i\$, \$j\$ integers. For example, the first positive Loeschian numbers are: \$1\$ (\$i=1, j=0\$); \$3\$ (\$i=j=1\$); \$4\$ (\$i=2, j=0\$); \$7\$ (\$i=2, j=1\$); \$9\$ (\$i=-3, j=3\$); ... N...
[Question] [ A simple one today. Write the shortest program that draws a "sawtooth alphabet" given a positive integer for the height. You must write the name of your programming language when you come to the letter it starts with. For example, if your language is Python and the input is `1` the output should be: ``...
[Question] [ # Introduction Turns out, aliens love memes just as much as we do. Every alien race we've encountered so far has their own version of `2spooky4me` (see [the following question](https://codegolf.stackexchange.com/questions/62350/halloween-golf-the-2spooky4me-challenge)) and equivalent, though, with some...
[Question] [ You're a professional hacker and your boss has just ordered you to help a candidate win an upcoming election. Your task is to alter the voting machines data to boost the candidate's results. Voting machines store voting results as two integers : the number of votes for your candidate (`v1`) and the num...
[Question] [ The program should take a string as input and reverse the consonants in it, while keeping the order of vowels. All the letters will be lowercase, so you don't have to worry about casing. Examples follow. 1. Input: `a test case`. The consonants here are `t,s,t,c,s`. They should come in reversed order...
[Question] [ The "prime frog" is a strange animal that jumps between integers, until it arrives on 3 or 19... --- Your program should accept an integer `n` as input and output the result of the below algorithm (`3` or `19`). For a given integer `n >= 2`: 1. Let `f` be the position of the frog. It is initially set t...
[Question] [ Related: [Multiply Quaternions](https://codegolf.stackexchange.com/q/36928/78410) ## Challenge Given a string made of `ijk`, interpret it as the product of imaginary units of [**quaternion**](https://en.wikipedia.org/wiki/Quaternion) and simplify it into one of the eight possible values `1`, `-1`, `i`,...
[Question] [ *Due to technical limitations of Stack Exchange, the title is rendered incorrectly. The **correct** title for this challenge is* Make a ``` Word Icicle! Word Icicle Word cicle ord cicle ord icle ord i le or i le or i l or l or r ``` --- Today's chal...
[Question] [ Given a string as input, print a new string with each letter pushed to the right by its respective alphabet index. We all know that A is a slow and Z is a fast letter. This means that Z gets shifted to the right by 25 spaces, A doesn't get shifted at all and B gets shifted by 1 space. Your program only...
[Question] [ While there are many edit distance questions, such as [this one](https://codegolf.stackexchange.com/questions/51402/each-step-of-the-levenshtein-distance), there isn't a simple question to write a program that calculates the Levenshtein distance. **Some Exposition** [The Levenshtein edit distance betwe...
[Question] [ In this challenge, you are going to create a *Fellowship* with the goal of defeating all other fellowships in battle. **A fellowship (team) consists of 3 characters**. Each character moves independently of the rest of their team, but they will need to work together when fighting your enemy. Teams will ...
[Question] [ Seems like an impossible task right? Well, it's actually not that hard. If we write the word `Infinity` as 8-bit binary ASCII code, we'll get: ``` 01001001 01101110 01100110 01101001 01101110 01101001 01110100 01111001 ``` This can be concatenated, and converted to the decimal value `529127921521691557...
[Question] [ Recently, an electrical engineer studying traffic light timings was [fined $500 by the state of Oregon](https://motherboard.vice.com/en_us/article/oregon-man-fined-for-writing-i-am-an-engineer-temporarily-wins-the-right-to-call-himself-an-engineer) for referring to himself as an engineer. Given a 2 let...
[Question] [ In the spirit of [re-implementing classic video games](https://codegolf.stackexchange.com/q/10713/4098), I would like to invite the community to create their best implementation of [Tetris](http://en.wikipedia.org/wiki/Tetris). ![enter image description here](https://i.stack.imgur.com/yU0eR.png) *For...
[Question] [ # All Aboard the ASCII Train! ``` o O O ___ ___ ___ ___ ___ ___ ___ ___ ___ o | C | | O | | D | | E | | | | G | | O | | L | | F | TS__[O] |___| |___| |___| |___| |___| |___| |___| |___| |___| {======|_|"""""|_|""""...
[Question] [ Write a program that takes in an integer from 0 to 65535 (216-1) and generates a *unique* 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil: [![cracked soil sample 1](https://i.stack.imgur.com/GqnaPs.png)](https://i.stack.imgur.com/GqnaP.png) [![cracked s...
[Question] [ I don't like typing, so I draw my mazes in a very simple format: ``` # ##### # # # ### # # # # # # # # ##### # ``` Isn't it a-*maze*-ing? Of course, I think all mazes should look 3d, similar but not he same as [this challenge](https://codegolf.stackexchange.com/questions/36299/print-ascii-voxels)...
[Question] [ [Klein](https://github.com/Wheatwizard/Klein) is a 2D language I have designed that can be embedded on 12 different topological surfaces. A Klein program can be run on different surfaces by changing the command line arguments. The topology determines where the instruction pointer goes when it goes off ...
[Question] [ You are given a \$3\times3\$ square matrix where each cell is any digit between \$0\$ and \$9\$ except \$7\$. Your task is to figure out the *minimum* number of digits that must be replaced with \$7\$'s so that the sums of the digits in each row and each column are the same. **NB:** There is no constra...
[Question] [ In this challenge, you will receive an input, convert it to hexadecimal, make a couple changes, and output the result. Because they are only 16 characters in hexadecimal, your code will need to be as short as possible. --- ## Examples Examples are separated by a blank line. First line is input, second ...
[Question] [ **Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/1696/edit). Closed 6 years ago. [Improve this question](/po...
[Question] [ [Programming Puzzles & Code Golf](https://codegolf.stackexchange.com/) is about to get a [new moderator](http://meta.codegolf.stackexchange.com/a/5749/26997), [Dennis](https://codegolf.stackexchange.com/users/12012/dennis)! This challenge is a tribute to him and our other active (or recently active) mo...
[Question] [ Imagine a "wire" that has `n` spaces. Imagine further that there are "electrons" in that wire. These electrons only live for one unit of time. Any spaces in the wire that are adjacent to exactly one electron become an electron. In Game of Life terminology, this is `B1/S`. For example, this is a wire of...
[Question] [ Don't ask me how or why but while coding on a project I noticed that the characters of a couple of words had a particular pattern referred to the alphabet, I connected each character of the words with the pencil on the alphabet and I obtained two spirals, then I noticed that the first spiral was clockw...
[Question] [ This is much more advanced than [How to randomize letters in a word](https://codegolf.stackexchange.com/questions/3293/how-to-randomize-letters-in-a-word) and [Cambridge Transposition](https://codegolf.stackexchange.com/questions/9261/cambridge-transposition) because of the rule about which letters may...
[Question] [ [Golunar](https://esolangs.org/wiki/Golunar)/[Unary](https://esolangs.org/wiki/Golunar) is a way to encode all valid [Brainfuck](https://esolangs.org/wiki/Brainfuck) programs, but it is not an enumeration, since most natural numbers do not correspond to a valid program. For the purpose of this challeng...
[Question] [ ## Story Indiana Jones was exploring a cave where a precious treasure is located. Suddenly, an earthquake happened. When the earthquake ended, he noticed that some rocks that had fallen from the ceiling blocked his way to the treasure. He also noticed that he could push a stone, but since stones were v...
[Question] [ We all know that programmers tend to be lazy. In order to maximize your free time, you decide to write a program that outputs a minimal number of keystrokes for text fed into it. [![](https://i.stack.imgur.com/Ppffu.png)](https://en.wikipedia.org/wiki/File:Qwerty.svg) **Input**: Text that has to be con...
[Question] [ **This is the companion thread to the main [Unscramble the Source Code](https://codegolf.stackexchange.com/q/40932/2867) challenge.** If you think you have managed to unscramble one of the cop answers, you should post your solution as the answer to this thread. As a reminder, you have one attempt at cr...
[Question] [ [Pascal's triangle](http://en.wikipedia.org/wiki/Pascal%27s_triangle) is generated by starting with a 1 on the first row. On subsequent rows, the number is determined by the sum of the two numbers directly above it to the left and right. To demonstrate, here are the first 5 rows of Pascal's triangle: `...
[Question] [ # Goal: Given two natural numbers (integers from 0 to infinity), output a number that is not the sum of those numbers, but is a natural number. # Example solutions (TI-Basic): * `A+B+1` * `not(A+B)` # Invalid solutions: * `A+B-1` (for inputs `0,0`, it returns `-1`, which is not natural) * `"ABC"` (`ABC...
[Question] [ # Definition Fibonacci sequence `F(n)`, on the positive integers, are defined as such: ``` 1. F(1) = 1 2. F(2) = 1 3. F(n) = F(n-1) + F(n-2), where n is an integer and n > 2 ``` The Fibonacci-orial of a positive integer is the product of `[F(1), F(2), ..., F(n)]`. # Task Given positive integer `n`, fin...
[Question] [ # Task Read a string of characters and produce the [ROT13](http://en.wikipedia.org/wiki/Rot13) of it. All characters besides `[a-zA-Z]` should be output verbatim. Each letter in the output may be in any case you wish (you do not have to preserve it). ROT13 is a simple substitution cipher where each let...
[Question] [ *Blatant [rip-off](https://codegolf.stackexchange.com/q/192979/43319) of a [rip-off](https://codegolf.stackexchange.com/q/132558/43319). Go upvote those!* Your task, if you wish to accept it, is to write a program/function that outputs/returns its integer input/argument. The tricky part is that if I re...
[Question] [ This is a graphical output challenge where the task is to give the shortest code *per* language. **Task** Your code should plot a single purple pixel (hex value #800080 or rgb(128, 0, 128)), moving clockwise round a circle. It should take exactly 60 seconds to make a full journey round the circle and...
[Question] [ [CJam](http://sourceforge.net/projects/cjam/) is a GolfScript-inspired stack-based golfing language, created by PPCG user [aditsu](https://codegolf.stackexchange.com/users/7416/aditsu). So, in the vein of other language-specific tips questions: What general tips do you have for golfing in CJam? Please ...
[Question] [ From the subreddit [r/SpeedOfLobsters](https://www.reddit.com/r/SpeedOfLobsters/): > > Edit the text of an image to create a new phrase > > > This meme format/style is pretty self-explanatory. Simply have a browse through the subreddit if you need more examples. However, when coming up with ideas, ...
[Question] [ I just love this simple cypher, it's so fun reading not-quite human-readable words and filling the gaps... ``` Ot wes thi bist uf tomis, ot wes thi wurst uf tomis, ot wes thi egi uf wosdum, ot wes thi egi uf fuuloshniss, ot wes thi ipuch uf biloif, ot wes thi ipuch uf oncridaloty, ot wes thi siesun ...
[Question] [ Don't you love those [exploded-view diagrams](https://en.wikipedia.org/wiki/Exploded-view_drawing) in which a machine or object is taken apart into its smallest pieces? [![enter image description here](https://i.stack.imgur.com/6lcse.jpg)](https://i.stack.imgur.com/6lcse.jpg) Let's do that to a string...
[Question] [ Objectives: Output a String which contains every positive integer strictly below 1000. The obvious answer would be to concatenate every one of them, and that would create a String of 2890 characters (thanks manatwork), to avoid this kind of easy answer, the length of the string must be under 1500 chara...
[Question] [ ## The Challenge Write a program or function that takes no input and outputs a 3-dimensional vector of length \$1\$ in a **theoretically uniform** random direction. This is equivalent to a random point on the sphere described by $$x^2+y^2+z^2=1$$ resulting in a distribution like such [![Random distribu...
[Question] [ Your assignment is to write a program of **even length**, that prints an ASCII-art square (described below), that increases its side length by **1** unit each time the original source code is pasted in the middle of the current code. It is quite hard for me to define this task very well, so I'll give y...
[Question] [ **Question :** You will be given the starting and ending integers of a sequence and should return the number of integers within it which do not contain the digit `5`. The start and end numbers should be included! > > **Examples:** > > > 1,9 ‚Üí 1,2,3,4,6,7,8,9 ‚Üí Result 8 > > > 4,17 ‚Üí 4,6,7,8,9...
[Question] [ > > This question is part of a series Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday. You can find more information about Brain-Flak's Birthday [here](https://hackmd.io/KwRgnARiAcCGAsBaaEBMAGR8DG8Cmis0AZsVhPLOtsWAOzQAmIQA?view). > > > Today is Brain-Flak's first Bi...
[Question] [ The string `tut-tutut-tut-tuttut-tut` can be constructed with overlapping or concatenated instances of the word `tut-tut`: ``` tut-tutut-tut-tuttut-tut tut-tut tut-tut tut-tut tut-tut ``` The string `tut-tututut-tutut-tut` cannot: ``` tut-tututut-tutut-tut tut-tut^ ...
[Question] [ My mom really wants me to eat broccoli, but I hate it and never want to eat it. Mom wants to trick me so she cuts it into small pieces, puts it in a salad and mixes it. Help me find out if the salad contains broccoli! **Input:** Array of mixed letters of all the ingredients. For a single broccoli ingre...
[Question] [ [Sandbox](https://codegolf.meta.stackexchange.com/a/18107/64722) # French License Plates [French license plates](https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_France) come in a sequential order, following a specific pattern of numbers and letters : `AB-012-CD` ## Challenge Write a progra...
[Question] [ A number is balanced if the sum of the digits on each half of the number is equal, so: `1423` is balanced because `1+4 = 2+3`, so is: `42615` because `4+2=1+5`. Note that the middle digit is not included on either side (or it's included on both sides) if there's an odd number of digits. **Challenge:** ...
[Question] [ # Background: Standard operation math like basic addition and multiplication in the real world work like these: ``` 12 + 123 = 135 ``` and ``` 12 * 123 = 1476 ``` *That's not interesting and boring!* Many schools are already interpreting this as practice, practice, practice of formal algorithms. That i...
[Question] [ This challenge has two threads. This is the cops' thread. The robbers' thread is located [here](https://codegolf.stackexchange.com/questions/99156/polyglot-anagrams-robbers-thread). Your challenge is to choose an [OEIS](https://oeis.org) sequence and write two *full programs* in two different languages...
[Question] [ I suddenly really want to play tennis, but alas I do not have a court! Surprise! This is where you come in. You have to print a tennis court for me, but you have to do it in the fewest bytes possible because of confidential reasons. ## Tennis court ``` --------- | | --------- | | | xxxxxxxxx...
[Question] [ Write a program (or function) (let's call it P1), that when run, outputs another program P2 of the same language and exactly 1 byte longer than P1. Program P2 when run, should output a 3rd program P3 that's 1 byte longer than P2. P3 must output a program P4 that's one byte longer than P3, etc. The same...
[Question] [ ## Introduction Suppose you have a ruler with numbers from **0** to **r-1**. You place an ant between any two of the numbers, and it starts to crawl erratically on the ruler. The ruler is so narrow that the ant cannot walk from one position to another without walking on all the numbers in between. As t...
[Question] [ Here’s the picture of the first published picture of the Mandelbrot set. Use the fewest bytes possible to write a program or function that outputs the following. ![the Mandelbrot set](https://upload.wikimedia.org/wikipedia/commons/d/d7/Mandel.png) A trailing new line is permitted. Character `*` cannot ...
[Question] [ Here is the (quite scary) Five little ducks song(it is not long): ``` Five little ducks went out one day, over the hills and up away. Mother Duck said, "Quack Quack Quack Quack", but only four little ducks came back. Four little ducks went out one day, over the hills and up away. Mother Duck said, "Qua...
[Question] [ > > This challenge was inspired by a programming blog I frequent. Please see the original post here: [A Programming Puzzle](http://programmingpraxis.com/2013/06/28/a-programming-puzzle/) > > > --- # Challenge Define a function \$f:\mathbb{Q}\to\mathbb{Q}\$ such that \$f(f(n)) = -n\$ for all non-zer...
[Question] [ Write the shortest possible program (length measured in bytes) satisfying the following requirements: * no input * output is to stdout * execution eventually terminates * total number of output bytes exceeds [Graham's number](http://en.wikipedia.org/wiki/Graham%27s_number) Assume that programs run unti...
[Question] [ Choose a set of four bytes without replacement (i.e. no byte repeated), and not necessarily in any particular order, from any one of the following four sets: 1. The characters of any one single-byte encoding 2. The Unicode characters in the range 00–FF 3. The signed decimal integers in the range −128–1...
[Question] [ # Challenge Write a program or function that takes in 4 non-negative integers, A, B, C, and D, that represent two fractions, A/B and C/D, where B and D are non-zero and A <= B and C <= D. Output an ASCII art depiction of the fractions made of `|x-` characters on two lines as follows: * The lines will a...
[Question] [ While idly twisting my [Rubik's cube](https://en.wikipedia.org/wiki/Rubik%27s_Cube) around, my son noticed that it kept going back to the solved state. I'm pretty sure he thought this was some sort of voodoo magic at first, but I explained that if you keep repeating the same sequence of moves, it will ...
[Question] [ I'm supposed to sort a list of numbers, but I'm super lazy. It's really hard to figure how to swap all the numbers around until all of them are in increasing order, so I came up with my own algorithm that will guarantee that the new list is sorted¹. Here's how it works: For a list of size **N**, we'll ...
[Question] [ As a little kid, I liked to play with these toys a lot: [![enter image description here](https://i.stack.imgur.com/xRBjI.jpg)](https://i.stack.imgur.com/xRBjI.jpg) They probably intended for these to be used for art, but I always used them for math! Fractals, patterns, etc. One time, I was given this c...
[Question] [ ### Intro There are 3 nails in the wall. You've got a piece of string that is fixed to the picture frame with both ends. To hang the picture, you entangled the string with the nails. But before letting the picture go: Can you predict whether the image is going to fall, just by looking at how the string...
[Question] [ Your task is, given a positive integer `n`, to generate an expression that equals the number `n`. The catch is: you're only allowed the number `1` in the output. The operators at your disposal are: * `+`, `-`, `*` and `/` + `/` is floating-point division (so `5/2 = 2.5`). * `sqrt` (as `s`) * `ceil` an...
[Question] [ Determining whether a Turing machine halts is well known to be undecidable, but that's not necessarily true for simpler machines. A *Foo machine* is a machine with a finite tape, where each cell on the tape has an integer or the halt symbol `h`, e.g. `2 h 1 -1` The instruction pointer starts by pointin...
[Question] [ ## The challenge Well, I think it is quite clear, isn't it? You have to make a function or a program that takes a string as an argument and outputs the corrispondent Yoda-speaking. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so least number of bytes wins. ## Th...
[Question] [ In one of the more iconic xkcd strips, Randall Munroe visualised the timelines of several films in narrative charts: [![enter image description here](https://i.stack.imgur.com/VnwbU.png)](http://xkcd.com/657/large/) (Click for larger version.) Source: [xkcd No. 657](http://xkcd.com/657/). Given a speci...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic). Closed 7 years ago....
[Question] [ ### Task Given two strictly positive integers **n** and **d** as input, determine whether **n** is [evenly divisible](https://en.wikipedia.org/wiki/Divisibility_rule) by **d**, i.e., if there exists an integer **q** such that `n = qd`. You may write a [program or a function](https://codegolf.meta.stack...
[Question] [ You are to write a program which generates random integers between \$0\$ and \$99\$ inclusive, outputting each integer in turn, until \$0\$ is generated. You may choose which single-order random distribution (uniform, binomial, Poisson etc.) you use so long as each integer has a non-zero chance of bein...
[Question] [ Given a pattern (string or array format) of Bits : `[0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1]` The tasks is to replace any number of consecutive 1-Bits with an ascending number sequence starting at 1. **Input** * Pattern (can be received as an string or array) Example: + String: `1001011010110101001` + Arra...
[Question] [ Or, "Swap the first and last letters of each word" Your challenge is to, given a string of alphabetical ASCII characters as well as one other character to use as a delimiter (to separate each word), swap the first and last letters of each word. If there is a one-character word, leave it alone. The exam...
[Question] [ You are to print this exact text: ``` ABABABABABABABABABABABABAB BCBCBCBCBCBCBCBCBCBCBCBCBC CDCDCDCDCDCDCDCDCDCDCDCDCD DEDEDEDEDEDEDEDEDEDEDEDEDE EFEFEFEFEFEFEFEFEFEFEFEFEF FGFGFGFGFGFGFGFGFGFGFGFGFG GHGHGHGHGHGHGHGHGHGHGHGHGH HIHIHIHIHIHIHIHIHIHIHIHIHI IJIJIJIJIJIJIJIJIJIJIJIJIJ JKJKJKJKJKJKJKJKJKJKJK...
[Question] [ Some characters are more holy than others. Using as few unholy letters as possible, display the statement above. **Challenge** Write a full program to print `Holy Hole In A Donut, Batman!` to STDOUT or closest alternative. If you can compress the input to reduce your score, go wild :) **Input** None **...
[Question] [ The ***[Catalan numbers](https://en.wikipedia.org/wiki/Catalan_number)*** ([OEIS](https://oeis.org/A000108)) are a sequence of natural numbers often appearing in combinatorics. The nth Catalan number is the number of Dyck words (balanced strings of parenthesis or brackets such as `[[][]]`; formally def...
[Question] [ Imagine travelling to a point lying **A** miles away horizontally and **B** miles away vertically from your current position. Or in other words, travelling from `(0, 0)` to point `(a, b)`. How far would you need to end up travelling? This seems like a straightforward question, but the answer depends on...
[Question] [ **Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/31506/edit). Closed 2 years ago. [Improve this question](/posts/31506/edit) ...
[Question] [ Write a function/program that accepts a string of lower/uppercase letters [A-Za-z] as input, that checks whether the occuring letters are unique and in alphabetical order (ignoring lower and uppercase) or not. The output must be truthy if they are unique and in alphabetical order and falsy if not. Here...
[Question] [ Unfortunately [one of the greatest comic book writers](https://en.wikipedia.org/wiki/Stan_Lee) passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we must do something as well. **Challenge** Print The Avengers ...
[Question] [ Echo the following in as few bytes as possible: ``` I'm Slim Shady. Yes, I'm the real Shady. All you other Slim Shadys are just imitating. So, won't the real Slim Shady please stand up? Please stand up. Please stand up. ``` The following five words must appear **EXACTLY ONCE** in your code: `I'm` `Sl...
[Question] [ # The Challenge: Print every 2 letter word [acceptable in Scrabble](http://phrontistery.info/scrabble3.html) using as few bytes as possible. I have created a text file list [here](http://pastebin.com/raw.php?i=iYLyuS1N). See also below. There are 101 words. No word starts with C or V. Creative, even if...
[Question] [ # Robbers section The cops section can be found [here](https://codegolf.stackexchange.com/q/88979/34388). ### Challenge Your task is to outgolf the submissions of the cops *in the same language* and *the same version* (for example, **Python 3.5** ≠ **Python 3.4**, so that is not allowed). A submission ...
[Question] [ **UPDATE** : [isaacg's Pyth submission](https://codegolf.stackexchange.com/a/37863/31414) is the winner! --- Many of you must have heard that there is a cooler version of JavaScript in town (read ES6) which has a method `String.prototype.repeat` so that you can do ``` "Hello, World!".repeat(3) ``` and ...
[Question] [ Write a program that takes in (via STDIN/command line) a non-negative integer N. When N is 0, your program should print `O` (that's capital Oh, not zero). When N is 1, your program should print ``` \|/ -O- /|\ ``` When N is 2 your program should print ``` \ | / \|/ --O-- /|\ / | \ ``` When N is 3 you...
[Question] [ A [haiku](https://www.youngwriters.co.uk/types-haiku-poem) is a poem with three lines, with a 5/7/5 *syllable* count, respectively. A **haiku-w** is poem with three lines, with a 5/7/5 **word** count, respectively. ## Challenge Write a program that will return **true** if the input is a haiku-w, and **...
[Question] [ # Alternating Arrays An *alternating array* is a list of any length in which two (not necessarily different) values are alternating. That is to say, all even-indexed items are equal, and all odd-indexed items are equal. Your task is to write a program or function which, when given a list of positive in...
[Question] [ Given a nonempty finite list of integers, output a *truthy* value if there are exactly two equal entries and all other entries are distinct, and a *falsey* value otherwise. ### Examples ``` truthy: [1,1] [1,2,1] [1,6,3,4,4,7,9] falsey: [0] [1,1,1] [1,1,1,2] [1,1,2,2] [2,1,2,1,2] [1,2,3,4,5] ``` ...