text
stringlengths
180
608k
[Question] [ Coders are always trying to flatten arrays into boring 1-dimensional entities and it makes me sad. Your task is to unflatten an arbitrary string of characters, outputting a lovely city skyscape. Consider the string: `aaabbbbbccqrrssstttttttPPw` It looks much better like this: ``` tt ...
[Question] [ Some of you may be familiar with the way that a motorcycle shifts. But for those who don't, It looks like this 6 5 4 3 2 N 1 Now I want to know what gear I am in after performing a few up and down shifts. The program should work from neutral. Sample input: ``` V^^ ``` Sample output: ``` 2 ``` As you c...
[Question] [ A little while back, data was frequently stored on punched card. A typical card would have 80 columns of 12 possible 'punch' positions. A plethora of encodings was used, each for their own specific purpose. These days we like to think of a byte as 8 bits. In this challenge, you're tasked to convert an ...
[Question] [ Your challenge is to expand some brackets in a program's input as shown: 1. Find a string *s* between two matching brackets `[` and `]`, with a single digit *n* after the closing bracket. 2. Remove the brackets. 3. Replace *s* with itself repeated *n* times. (If *n* is 0, simply remove *s*.) 4. Go to s...
[Question] [ Take a non-empty matrix / numeric array containing positive integers as input. Return, in this order, the sums of the first row and column, then the second row and column and continue until there aren't any more rows or columns. Suppose the input is: ``` 2 10 10 2 4 9 7 7 2 9 1 ...
[Question] [ There are 97 [ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters) characters that people encounter on a regular basis. They fall into four categories: 1. Letters (52 total) ``` ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ``` 2. Numbers or Digits (10 total) ``` 0123456789 ``` 3. Sy...
[Question] [ Given two note names, you are to write a program that determines if the interval formed by these two notes is consonant or dissonant. # Introduction In Western music, there are only 12 "different" tones. Their names, sorted from lowest to highest, are these: `C, C#, D, D#, E, F, F#, G, G#, A, A#, B`. T...
[Question] [ # Most of us know... that all primes `p>3` are of the form [![enter image description here](https://i.stack.imgur.com/3EjFI.gif)](https://i.stack.imgur.com/3EjFI.gif) But, how many are the **Plus Primes** (`6n+1`) and how many are the **Minus Primes** (`6n-1`) in a certain range? # The Challenge Given ...
[Question] [ > > ...and real golf for my code friends. > > > This is a challenge based on [a one year old XKCD comic](https://www.xkcd.com/1645/) which consists mostly of toasts (parodies of the first in the comic) following a distinct pattern, but with some slight variation. Your task is to write a program (or...
[Question] [ Since the first weekend of October is drawing near, let's have our own Oktoberfest! ## Background You and some other programmers have been hired by the local sausage guys in Munich, Germany. The sausage guys provide Oktoberfest with all the sausages the giant Volksfest needs. You manage to overhear you...
[Question] [ Write a program to calculate the first 500 digits of pi, meeting the rules below: * It must be less than 500 characters in length. * It cannot include "pi", "math.pi" or similar pi constants, nor may it call a library function to calculate pi. * It may not use the digits "3", "1" and "4" consecutively....
[Question] [ ## Winner found It seems as if we have a winner! Unless anyone plans on contesting the world's current fastest Sudoku solver, user 53x15 wins with the staggeringly fast solver Tdoku. For anyone still working on their solvers, I'll still benchmark new submissions when I have time. ## The challenge The g...
[Question] [ In the esoteric programming language Curly, programs consist solely of curly braces `{}` and semicolons `;`. Despite this humble toolset, Curly has literals that can represent any nonnegative integer. The format is a little hard for the uninitiated to read, though, so let's write some code to do the co...
[Question] [ # Gozinta Chains (Inspired by [Project Euler #606](https://projecteuler.net/problem=606)) A gozinta chain for n is a sequence `{1,a,b,...,n}` where each element properly divides the next. For example, there are eight distinct gozinta chains for 12: ``` {1,12}, {1,2,12}, {1,2,4,12}, {1,2,6,12}, {1,3,12}...
[Question] [ ### Background Celebrating [the release of Dyalog APL 16.0](https://www.dyalog.com/dyalog/dyalog-versions/160.htm), where the solution to this problem is `{⊢⌺(≢⍵)⊢⍵}`[Explanation](https://codegolf.stackexchange.com/a/129585/43319) ### Task Given a printable ASCII string **of odd length** *n*, make an *...
[Question] [ Inspired by [this Game of Life question](https://codegolf.stackexchange.com/questions/88783/build-a-digital-clock-in-conways-game-of-life). [Wireworld](https://en.wikipedia.org/wiki/Wireworld) simulates "electrons" flowing through "wires", simple arrangements of which produce typical logic gate behavio...
[Question] [ ## CONGRATULATIONS to @kuroineko. Wins the bounty for excellent speed (672 moves) on the Gauntlet track. ### LEADER:\* Nimi scoring a lightweight 2129. Other entries are larger but showing some serious speed. \*Leader may change due to later entries. Your task is to write a small program that can drive...
[Question] [ (Note: This is a spin-off of my previous challenge [Find the Swirling Words!](https://codegolf.stackexchange.com/questions/95507/find-the-swirling-words)) ### Definition of *Infinity Word*: 1. If you connect with curves all the characters of an *Infinity Word* on the alphabet (A-Z) you obtain the infin...
[Question] [ Write a function (using as few bytes as possible) that takes a bi-dimensional array of any number of columns and rows in which: * `0` represents empty block, * `1` represents snake block. The function must return the number of possible paths the snake traveled. **Example 1:** Input: ``` [ [1,1,1,1,1]...
[Question] [ First, study [this puzzle](https://puzzling.stackexchange.com/questions/5573/continue-the-pattern-of-circles) to get a feel for what you will be producing. Your challenge is to write a program or function which will output a circular graphic like the ones from the puzzle, given a (base 10) number betwe...
[Question] [ When it comes to eating candy, I hold myself to higher standards than the typical layperson. There is a delicate balance between "mixing it up" and "saving the best for last." In this challenge, you will be given a string of characters in which each character represents a piece of candy. Different char...
[Question] [ Given a date as input in any convenient format, output a calendar with that date as the exact center of a five-week window. The header of the calendar must include the two-letter abbreviations for the days of the week (i.e., `Su Mo Tu We Th Fr Sa`). Three-letter or other abbreviations of the days are n...
[Question] [ My teacher always gives me the most complicated set of math problems for homework. Like: `pg. 546: 17-19, 22, 26, pg. 548: 35-67 odd, 79, 80-86 even`. And I want to know in advance how much time to set aside for my homework, but I don't want to have to figure all that out. That's why its your task to p...
[Question] [ Given positive integer `n > 2`. We convert it to an array as follows: 1. If it is equal to `2` return an empty array 2. Otherwise create array of all `n`'s prime factors sorted ascending, then each element replace with its index in prime numbers sequence and finally convert each element to array For ex...
[Question] [ Of course, the SE network is very knowledgeable about how to be respectful in the restroom, but for those of you who need a recap, being respectful means flushing the toilet, etc. Most importantly, though, it means using the stall as far away from others as possible. **The challenge** Given a blueprin...
[Question] [ ## Introduction: [![enter image description here](https://i.stack.imgur.com/9RDww.png)](https://i.stack.imgur.com/9RDww.png) > > Inspired by a discussion that is already going on for many years > regarding the expression \$6÷2(1+2)\$. > > > With the expression \$6÷2(1+2)\$, mathematicians will quic...
[Question] [ ## Challenge Given an input integer `n > 0`, output the number of primes (*other* than `n`, if `n` itself is prime) that can be produced by altering one digit in the decimal expansion of n (without changing the number of digits). ## Examples For example, `n = 2`. By altering one digit in the decimal ex...
[Question] [ In the game [Tetris](http://en.wikipedia.org/wiki/Tetris), there are 7 types of bricks or *Tetr**i**minoes*, which are mathematically known as [tetr**o**minoes](http://en.wikipedia.org/wiki/Tetromino) because they are all made with 4 square segments: [![Tetris bricks](https://i.stack.imgur.com/YcgOC.pn...
[Question] [ Your task is to write some code in Python 2 or 3 such that this expression: ``` (a+b)(c+d) == a*c + b*c + a*d + b*d ``` will evaluate to `True` without raising any exceptions. To clarify, I will copy your code into a file, then `from` the file `import *`. Then I will type the expression into the consol...
[Question] [ **Overview** Write a program that prints out simple fractal patterns given a bit pattern encoding the fractal, plus the per-generation scale factor of the fractal and number of generations. **Explanation** Here is an ASCII representation of the [Sierpinski Carpet](https://en.wikipedia.org/wiki/Sierpins...
[Question] [ ## Scoreboard Here are the raw scores (i.e. domino counts) for VisualMelon's submission. I'll turn these into the normalised scores described below, when more answers come in. The existing solution can now solve all circuits in the benchmark: ``` Author Circuit: 1 2 3 4 5 6 7 ...
[Question] [ *Inspired by [this question on Math.SE](https://math.stackexchange.com/q/1399055/50421).* Starting with `1` you can repeatedly perform one of the following two operations: * Double the number. **or** * Rearrange its digits in any way you want, except that there must not be any leading zeroes. Taking an...
[Question] [ As we all know, [meta](http://meta.codegolf.stackexchange.com/questions/185/language-handicap) [is](http://meta.codegolf.stackexchange.com/questions/1946/headers-in-verbose-languages) [overflowing](http://meta.codegolf.stackexchange.com/questions/7887/are-golf-languages-finally-drowning-us) [with](http...
[Question] [ # Introduction Everyone knows that the possibility of successfully navigating an asteroid field is approximately 3,720 to 1. But despite your warning, Han Solo is still willing to try his luck. Fearing for your artificial life, you decide to code, in the ship's peculiar dialect (*read: your preferred C...
[Question] [ Given a [POSIX](http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended) [Extended Regular Expression](http://en.wikipedia.org/wiki/Regular_expression#POSIX_extended) as input, output its complement (also a POSIX ERE). If the given regular expression matches a string, its complement sh...
[Question] [ This challenge is about the game Tic Tac Toe, but it's played on a torus. # How to play To create the necessary game board, you start out with a regular Tic Tac Toe game board. First fold it into a cylinder by joining the left and the right edge. Then fold it into torus by joining the top and the bott...
[Question] [ I need to go to the bank and withdraw some money. I need to withdraw $30, $22 to pay my roommate for the internet and $8 for laundry. Since neither of these can make change, I need my $30 to be split into two partitions of the two sizes. That means when the teller asks me how I want my $30 I am going t...
[Question] [ # Introduction Given an ASCII tower and the force of the wind, write a program or function to determine if the tower will balance or which way it will fall. For example the first tower balances but the second falls over toward the left. ``` # # # # ### ### ### ###...
[Question] [ Your task is simple, write a single code snippet that when executed in one language outputs only the string `'abc'` and when executed in another language outputs only the string `'cba'`. The program should take no input. This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-gol...
[Question] [ Your task: given a number `n`, generate a '+' sign that is `n` characters away from its center. If this is confusing, check out the test cases. Standard methods of input: output must be a string or printed. Standard loopholes apply. ``` Input: 1 Output: + ] 1 away from center `+`. Input: 2 Ou...
[Question] [ [Sandbox](https://codegolf.meta.stackexchange.com/a/19269/59642) **Definition:** A positive integer `n` is *almost-prime*, if it can be written in the form `n=p^k` where `p` is a prime and `k` is also a positive integers. In other words, the prime factorization of `n` contains only the same number. **I...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win. Closed 6 years ago. [Improve this quest...
[Question] [ So, I wrote myself a one-liner which printed out a snake on the console. It's a bit of fun, and I wondered how I might condense my code... Here's a (short) example output: ``` + + + + + + ...
[Question] [ Write a program that takes 2 strings as input, and returns the longest common prefix. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the answer with the shortest amount of bytes wins. ``` Test Case 1: "global" , "glossary" "glo" Test Case 2: "department" , "dep...
[Question] [ On 4chan, a popular game is get. Every post on the site gets a sequential post ID. Since you can't influence or determine them, people try to guess (at least a part of) their own post number, usually the first few digits. Another version of the game is called dubs, and it's goal is to get repeating dig...
[Question] [ ## Challenge Given a single word as input, determine if the word is odd or even. ## Odd and Even words Assume the general rules: ``` odd + odd = even even + odd = odd odd + even = odd even + even = even ``` In the alphabet, the odd letters are: ``` aeiou ``` And the even letters are: ``` bcdfghjklmnpqr...
[Question] [ Just had a 'spirited' conversation with a co-worker about the succinctness of the following BASIC statement: ``` 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 ``` It's the title of [this book](https://rads.stackoverflow.com/amzn/click/com/0262018462), and will simply print a sequence of `/` and `\` characters...
[Question] [ Inspired by [this](https://stackoverflow.com/q/33787939/509868) question: Make a function (or a full program) that receives a list of numbers and outputs the list rearranged, so that even-indexed numbers appear first, and odd-indexed numbers follow. The values of the numbers themselves don't affect ord...
[Question] [ On most [new-years](/questions/tagged/new-years "show questions tagged 'new-years'") challenges when it is currently not the corresponding year of the challenge, It says this in the front. > > It's [current year] already, folks, go home. > > > You have to output this text with the current year subs...
[Question] [ Make a Windows style Loading bar by the following instructions. (notice that this is different than [Loading... Forever](https://codegolf.stackexchange.com/questions/101289/loading-forever)) Your output should start by `[.... ]`. Every tick, you should wait 100 ms, then move each dots by one character...
[Question] [ ## Intro/Background I was looking at "You Had One Job" pictures lately, and noticed an old favourite of mine: [![SHCOOL](https://i.stack.imgur.com/P8PwA.jpg)](https://i.stack.imgur.com/P8PwA.jpg) And I said to myself: "I need a program that can generate text like that". So I devised a set of rules for ...
[Question] [ [Wikipedia: Zeno's Dichotomy Paradox](https://en.wikipedia.org/wiki/Zeno%27s_paradoxes#Dichotomy_paradox) > > An infinite number of mathematicians walk into a bar. The first one orders a beer. The second one orders half a beer. The third one orders a fourth of a beer. The bartender stops them, pours t...
[Question] [ # Background Euler's [totient](https://en.wikipedia.org/wiki/Euler%27s_totient_function) function `φ(n)` is defined as the number of whole numbers less than or equal to `n` that are relatively prime to `n`, that is, the number of possible values of `x` in `0 < x <= n` for which `gcd(n, x) == 1`. We've...
[Question] [ I was expecting to post something more complex as my first puzzle in PCG, but a particular, uh... [homework question on Stack Overflow](https://stackoverflow.com/q/26623488/1461424) inspired me to post this. They want to: > > print the following pattern for any given word that contains **odd** number ...
[Question] [ *EDIT (Jan 19, 2022, 18:00 UTC): This challenge is now over. The winner is [Citty](https://codegolf.stackexchange.com/users/75429/citty) with [this Pyth answer](https://codegolf.stackexchange.com/a/223147/58563). Congratulations!* --- This is an [answer-chaining](/questions/tagged/answer-chaining "show...
[Question] [ Jelly has an "untruth" atom: `Ṭ`. This takes a non-empty array of positive integers and returns a Boolean array with **1**s at the indexes in the input. For example: ``` [1,3,5,6]Ṭ ⁼ [1,0,1,0,1,1] [5]Ṭ ⁼ [0,0,0,0,1] [2,1,1,2]Ṭ ⁼ [1,1] [5,4,3]Ṭ ⁼ [0,0,1,1,1] [1]Ṭ ⁼ [1...
[Question] [ # Backstory Meet my friend Jimmy: ``` /o\ ``` Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform: ``` /o\ ------------- ``` Now, Jimmy has a good sense of balance, so he can safely stand with one leg off of the platform, like so: ``` /o...
[Question] [ Consider the following number sequence: > > \$ 0, \frac{1}{2}, \frac{1}{4}, \frac{3}{4}, \frac{1}{8}, \frac{3}{8}, \frac{5}{8}, \frac{7}{8}, \frac{1}{16}, \frac{3}{16}, \frac{5}{16}, \frac{7}{16}, \frac{9}{16}, \frac{11}{16}, \frac{13}{16}, \frac{15}{16}, \frac{1}{32}, \frac{3}{32}, \frac{5}{32}, \dot...
[Question] [ Take a string of binary characters separated by a space, and convert it to an ASCII string. For example... ``` 1001000 1100101 1101100 1101100 1101111 100000 1010111 1101111 1110010 1101100 1100100 ``` Would convert to... ``` Hello World ``` **This is a code-golf challenge so the shortest solution wins...
[Question] [ The [infinite monkey theorem](https://en.wikipedia.org/wiki/Infinite_monkey_theorem) states that, given infinite time, a machine sending an endless stream of random characters will always type any given text. That sounds to me like a great idea for a challenge. ## Process In order to monkey-ize a strin...
[Question] [ # Challenge Given that Christmas is: * December * Month 12 * Day 25 Every year, determine today's date, and whether or not today is Christmas. If it is Christmas, you must print `"It's Christmas"`. If it is not Christmas, you must somehow wait until Christmas and then print `"It's Christmas"`. # Exampl...
[Question] [ You've seen the amazing [alphabet triangle](https://codegolf.stackexchange.com/questions/87496/alphabet-triangle?s=1%7C2.3157), the [revenge of the alphabet triangle](https://codegolf.stackexchange.com/questions/90497/alphabet-triangle-strikes-again) and now it's time for the revenge of the revenge of ...
[Question] [ There are more than 100 elements in the modern periodic table. You challenge is to output the rounded mass of an element with respect to the input given. # Input * Input will contain an abbreviation of an element. * Input can be taken from any one of the following: + `stdin` + command-line arguments ...
[Question] [ *This is a repost of [Evolution of “Hello World!”](https://codegolf.stackexchange.com/questions/40376/evolution-of-hello-world), originally written by user Helka Homba* *It should not be closed as a duplicated, due to meta consensus [here](http://meta.codegolf.stackexchange.com/a/11123/60042).* *The or...
[Question] [ In the C programming language, arrays are defined like this: ``` int foo[] = {4, 8, 15, 16, 23, 42}; //Foo implicitly has a size of 6 ``` The size of the array is inferred from the initializing elements, which in this case is 6. You can also write a C array this way, explicitly sizing it then defi...
[Question] [ # Challenge Your task is to write a piece of code that outputs another piece of code. That code must in turn output yet another code until the final code outputs the integer **1**. The chain ends the first time **1** is outputted. **None of your programs may share any characters** (there's one exceptio...
[Question] [ # The challenge Given two integers as input (`x` and `y`), output `x` as a string with as many leading zeroes necessary for it to be `y` characters long without the sign. ## Rules * If `x` has more than `y` digits, output `x` as string without modification. * Output as integer is not accepted, even if ...
[Question] [ ## Task: Your challenge is, given previous submissions and itself as input, output the language that they're written in, in the following format: Say the first program is in Ruby. It must output `1`, because Ruby is the `1`st language used in this challenge. An example program is: ``` a=gets puts 1 ```...
[Question] [ ## The task This challenge is very simple. Your input is a rectangular 2D array of integers, sized at least 1×1. It can be taken in any reasonable format. Your output shall be the input array, but with all entries *not* on the first or last row or column set to `0`. It must be in the same format as the...
[Question] [ ## The Challenge Given two strings/an array of strings, output the first string slowly shrinking and expanding back into the second string. You can assume the strings will always start with the same character. ## Example ``` Input: "Test", "Testing" Output: Test Tes Te T Te Tes Test Testi Testin Testin...
[Question] [ > > A number is a *Mersenne Prime* if it is both prime and can be written in the form **2n-1**, where **n** is a positive integer. > > > Your task is to, given any positive integer, determine whether or not it is a Mersenne prime. You may submit either a function which returns a truthy/falsy value...
[Question] [ # Introduction Some days ago I needed a metronome for something. I had none available so I downloaded an app from the App Store. The app had a size of 71 MB!!! **71 MB for making tic-toc...?!** So code-golf came into my mind and I was wondering if some of you guys could improve this. # Challenge ...
[Question] [ In honor of how much rep I had several hours ago, when I first thought of this challenge: [![enter image description here](https://i.stack.imgur.com/HftMG.png)](https://i.stack.imgur.com/HftMG.png) Numbers like this that are made up of a single digit repeating are called [repdigits](https://en.wikipedi...
[Question] [ Write a program which plays Russian Roulette! If the program is started, * there should be a 5 in 6 chance of it ending normally after printing "I survived!" * there should be a 1 in 6 chance of the program crashing. (segmentation fault, etc.) No input, and no other outputs are allowed. The randomness...
[Question] [ ## Introduction Partly inspired by [this StackOverflow question](https://stackoverflow.com/questions/30640309/how-to-create-a-lightning-bolt-design-using-css), let's draw an ASCII Lightning Bolt. Write a program that takes a positive Integer `n` via STDIN or command line and outputs the ASCII Lightning...
[Question] [ # About the Series I will be running a little series of code-golf challenges revolving around the theme of randomness. This will basically be a [9-Hole](https://codegolf.stackexchange.com/q/16707/8478) [Golf Course](https://codegolf.stackexchange.com/q/19163/8478), but spread out over several questions...
[Question] [ ### Challenge: Given a positive integer input **n**, create a vector that follows this pattern: ``` 0 1 0 -1 -2 -1 0 1 2 3 2 1 0 -1 -2 -3 -4 -3 -2 -1 ... ±(n-1) ±n ``` Or, explained with words: The vector starts at `0`, and makes increments of `1` until it reaches the smallest odd positive int...
[Question] [ Your challenge is simple. Write two programs that share no characters which output each other. ## Example Two programs **P** and **Q** are mutually exclusive quines if: 1. **P** outputs **Q** 2. **Q** outputs **P** 3. There is no character *c* which belongs to both **P** and **Q** 4. Each program **P**...
[Question] [ [Raffaele Cecco](https://www.retrogamer.net/profiles/developer/raffaele-cecco/) is a programmer who produced [some](http://www.crashonline.org.uk/43/exolon.htm) of the [best](https://en.wikipedia.org/wiki/Cybernoid) video games for the [ZX Spectrum](https://en.wikipedia.org/wiki/ZX_Spectrum) computer i...
[Question] [ There are one hundred members of the United States Senate. Assuming that nobody filibusters and that the Vice President isn't cooperating, at least fifty-one members are necessary to pass a bill. But some members work together better than others, entropy-wise. Your task: Output the last names of at lea...
[Question] [ ### Task Given the situation with this global pandemic, you've been enlisted to help maintain social distancing. Your challenge, should you choose to accept it, is to write a program that takes in the positions of a group of people and checks whether the group is following social distancing rules. Your...
[Question] [ This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") puzzle the robbers' thread can be found [here](https://codegolf.stackexchange.com/questions/107014/hidden-inversions-robbers-thread). Your task will be two write two programs (or functions) such ...
[Question] [ Word's `**A**▲` and `**ᴀ**▼` buttons change the font size according to these rules: 1. The starting font size is 11. 2. If `**ᴀ**▼` is pressed when the font size is 1, the size stays 1. 3. The font size changes with 1 point in the range 1 – 12. 4. The font size changes with 2 points in the ...
[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] [ ## Challenge You need to generate a program or function that takes in a positive integer N, calculates the first N terms of the Fibonacci sequence in binary, concatenates it into a single binary number, converts that number back to decimal, and then outputs the decimal as an integer. For example ``` 1 ...
[Question] [ Let `n` and `b` be positive integers larger than `1`. Output the distance from `n` to the next power of `b`. For `n=5` and `b=3`, the next power of `3` from `5` is `9` (`3^2 = 9`), so the output is `9 - 5 = 4`. For `n=8` and `b=2`, the next power of `2` from `8` is `16` (`2^4 = 16`), so the output is `...
[Question] [ Let's create a simple, [surjective](https://en.wikipedia.org/wiki/Bijection,_injection_and_surjection) mapping from positive integers to [Gaussian integers](https://en.wikipedia.org/wiki/Gaussian_integer), which are [complex numbers](https://en.wikipedia.org/wiki/Complex_number) where the real and imag...
[Question] [ Based on a comment by George Edison to [this question](https://codegolf.stackexchange.com/questions/471/self-compiling-compiler), write the smallest self-interpreting interpreter. * You may use the language of your choosing. * Empty languages do not count. Your program must be at least two characters l...
[Question] [ > > Be sure to see the other challenge, [Reverse ASCII character map](https://codegolf.stackexchange.com/q/137227/61563)! > > > The ASCII charset (American Standard Code for Information Interchange) is the most widely-used character encoding standard. ASCII codes represent text in computers, teleco...
[Question] [ # Goal Write a program or function that translates a numerical telephone number into text that makes it easy to say. When digits are repeated, they should be read as "double n" or "triple n". # Requirements ## Input A string of digits. * Assume all characters are digits from 0 to 9. * Assume the string...
[Question] [ This task is part of the [First Periodic Premier Programming Puzzle Push](http://meta.codegolf.stackexchange.com/q/298/78) and is intended as demonstration of the new [king-of-the-hill](/questions/tagged/king-of-the-hill "show questions tagged 'king-of-the-hill'") challenge-type [proposal](http://meta....
[Question] [ This challenge is really simple (and a precursor to a more difficult one!). Given an array of resource accesses (simply denoted by nonnegative integers) and a parameter `n`, return the number of cache misses it would have assuming our cache has capacity `n` and uses a first-in-first-out (FIFO) ejection...
[Question] [ Your task is to determine whether two numbers are *easy to multiply*. This means that their base-10 [long multiplication](http://mathworld.wolfram.com/LongMultiplication.html) doesn't have any carrying (regrouping) between place values, looking at both the multiplication steps and the addition step. Th...
[Question] [ One of easiest code written by a programming language is a program printing sequence of characters (ex. "Hello, world!"). However, [s](http://www.lscheffer.com/malbolge.shtml)[o](http://esolangs.org/wiki/Asdf)[m](http://esolangs.org/wiki/Polynomial)[e](http://esolangs.org/wiki/Funciton) [e](http://esol...
[Question] [ They say that `hate` is a strong word. I wanted to find out why, so I had a good look at the word. I noticed that every consonant had a vowel after it. That made it look quite strong to me, so I decided that that's what makes a word strong. I want to find more strong words, so I'll need a program for i...
[Question] [ [Dungeon Master](https://en.wikipedia.org/wiki/Dungeon_Master_(video_game)) was one of the first ever real-time role-playing games, originally released in 1987 on the Atari ST. Among other exciting things for the time, it offered a rather sophisticated spell system based on runes. Your task today is to...
[Question] [ **Task description:** Draw a cube in ASCII art in roughly a cabinet projection. `Monospaced fonts` often have characters that are about twice as high as they are wide. Since the input is the length of the vertical lines (excluding the corners), horizontal lines are drawn with twice as many characters s...
[Question] [ The derivative of a function is a cornerstone of mathematics, engineering, physics, biology, chemistry, and a large number of other sciences as well. Today we're going to be calculating something only tangentially related: the arithmetic derivative. # Definition The arithmetic derivative `a(n)` or `n'`...
[Question] [ ## CONGRATULATIONS to @kuroineko for the best entry and winning the 200 bounty from @TheBestOne (excellent sportsmanship!). Write a program to colour as much of an image as possible before opposition programs do. ## Rules in brief * Your program will be given an image, your colour, and integer N. * Eac...
[Question] [ Credits for the challenge idea go to @AndrewPiliser. His original proposal in [the sandbox](https://codegolf.meta.stackexchange.com/questions/2140/) was abandoned and since he has not been active here for several months, I have taken over the challenge. **[Balanced ternary](http://en.wikipedia.org/wiki...