text
stringlengths
180
608k
[Question] [ Today is November 11th, which for many regions is [Remembrance Day](https://en.wikipedia.org/wiki/Remembrance_Day). If you don't know anything about the history or context of Remembrance Day, you can read about it in the wiki page, but it's not relevant for this challenge. *In Flanders Fields* is a poe...
[Question] [ This challenge is about writing code to solve the following problem. Given two strings A and B, your code should output the start and end indices of a substring of A with the following properties. * The substring of A should also match some substring of B. * There should be no longer substring of A tha...
[Question] [ The [Cashier's Algorithm](https://en.wikipedia.org/wiki/Greedy_algorithm) is an algorithm for making change in the minimal number of coins that works quite well for most currency systems. However like most greedy algorithms it is not without its flaws. If a currency system is set up just right (or just...
[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/22992/edit). Closed 7 years ago. [Improve this question](/p...
[Question] [ *This is the robbers' thread. The cops' thread is [here](https://codegolf.stackexchange.com/q/135363/58826).* Your challenge is to crack a cop's submission by finding an input that makes it halt. You don't have to find out why, or all inputs that make it halt if there's more than one, or the input the ...
[Question] [ [The Sierpinsky Triangle](http://en.wikipedia.org/wiki/Sierpinski_triangle) is a fractal created by taking a triangle, decreasing the height and width by 1/2, creating 3 copies of the resulting triangle, and place them such each triangle touches the other two on a corner. This process is repeated over ...
[Question] [ **Task:** Output the Swiss flag. Happy Swiss National Day / Schweizer Bundesfeiertag / Fête nationale suisse / Festa nazionale svizzera / Fiasta naziunala svizra! **Details:** The flag consists of a white (`#FFFFFF`) cross on a red (`#FF0000`) background. The cross consists of a 6x6 square with arms ...
[Question] [ Your task is to compute the [greatest common divisor (GCD)](https://en.wikipedia.org/wiki/Greatest_common_divisor) of two given integers in as few bytes of code as possible. You may write a program or function, taking input and returning output [via any of our accepted standard methods](http://meta.cod...
[Question] [ Your challenge is to draw/plot one of the hearts below. The size must be at least 50x50 pixels (vector graphics is OK). You may choose which of the hearts you want to draw/plot. Axes, grid lines etc. are accepted. There must be **at least** 100 distinct coordinates/points on the graph. The heart can be...
[Question] [ *Disclaimer:* This challenge inspired by me spending the morning debugging recursive functions, which have been frying my brain a little. Here's an example of recursion, from a letter, we keep going to the previous letter of the alphabet, printing out each one as we go, until we hit the letter a, then ...
[Question] [ In as few Unicode characters as possible, print the following (144 characters): ``` 1, 2, 3 o'clock, 4 o'clock rock, 5, 6, 7 o'clock, 8 o'clock rock, 9, 10, 11 o'clock, 12 o'clock rock, We're gonna rock around the clock tonight. ``` You must not use any numbers in your code, except the digit `1`. ...
[Question] [ Here is a simple challenge for you: You must produce this ASCII representation of a chess board. White is represented by uppercase characters, and black is represented by lowercase. Empty tiles are represented by a `.`. Here is the full board: ``` rnbqkbnr pppppppp ........ ........ ........ ........ P...
[Question] [ The challenge is to implement a program or function (subsequently referred to as "program") that takes a nonnegative integer \$n\$ as input and returns \$n\over\sqrt{2}\$ (the input divided by the square root of two) as output, rounded to a nonnegative integer. You may take your input and output in any...
[Question] [ Draw the ionising-radiation-hazard-symbol in an arbitrary colour on a distinctly coloured background. The specific proportions were published in the June 27th 1974 issue of the [Federal Register](https://en.wikipedia.org/wiki/Federal_Register) of the US Government. ### Details * As output, writing to a...
[Question] [ Given a positive integer n write some code to take its prime factorization and replace all of its factors of `2` with `3`. For example ``` 12 = 2 * 2 * 3 -> 3 * 3 * 3 = 27 ``` This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the goal is to minimize the byte count ...
[Question] [ My colleague recently sent me the following piece of JavaScript as a joke: ``` let butScript = (nrOfButs) => { for(var i = 0; i < nrOfButs; i++){ if(i % 3 == 0){ console.log("Yeah") } if(i % 2 == 0){ console.log("But") } if(i % 3 == 1)...
[Question] [ # Briefing The difficulty of a Code Golf question can be calculated as such: $$\text{clamp} \left( \left\lceil \left( \frac v a \div 700 \right) \times 10 \right\rceil, 0, 10 \right)$$ Where \$v\$ is the number of views a question has and \$a\$ is the number of answers a question has and \$‚åàx‚åâ\$ is...
[Question] [ An *insignificant array* is an array of positive integers, where the absolute differences between consecutive elements are all smaller than or equal to **1**. For example, the following array is insignificant: ``` [1, 2, 3, 4, 3, 4, 5, 5, 5, 4] ``` Because the corresponding (absolute) differences are: ...
[Question] [ [Deleted questions on Stack Overflow](https://stackoverflow.com/questions/23791278/write-a-function-that-takes-an-unsigned-integer-as-input-and-returns-true-if-al) sometimes make for great golf material. Write a function that takes a nonnegative integer as input, and returns true if all the digits in t...
[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/35372/edit). Closed 2 years ago. [Improve this question](/posts/35372/edit) ...
[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 8 years ago. [Improve this quest...
[Question] [ Write a [quine](http://en.wikipedia.org/wiki/Quine_%28computing%29) that consists of real English words separated by single spaces. A "word" is defined as a string containing only lowercase and uppercase letters (`/[a-zA-Z]+/` in regex). To be "real" your word must be recognized by the [official Scrabb...
[Question] [ **The Challenge** Output a list of years that starts with the current year and ends 120 years ago. The birth year of every living human would be included in this list. **Details** The list should be in descending order. Every built-in function to manipulate arrays and/or lists is allowed. Shortest code...
[Question] [ it's a-me! Today's task is simple: write a program, or a function that displays the idle small Mario sprite, from Super Mario Bros, on NES, over a blue background. Any kind of entry is valid as long as it displays those 12 \* 16 pixels anywhere on the screen / window / browser. (EDIT: the displayed ima...
[Question] [ You have two values each of which is either `0` representing "unknown", or one of `1,2,3`. Merge them into a single value as follows: * If both values are nonzero and equal, output that value: `(3,3) -> 3` * If both values are nonzero but unequal, output 0 for unknown: `(1,2) -> 0` * If one value i...
[Question] [ [Sound synthesizers](https://en.wikipedia.org/wiki/Synthesizer) use envelope generators to control how certain parameters of the sound (such as overall loudness) change with time. In many synthesizers an envelope is defined by four parameters, as represented in the following figure from [Wikipedia](htt...
[Question] [ Your task is to write a full program that will continue to count down from 10 every time it is run. * The first time you run the program, it should print `10`. * The next time, it should output `9`. * The next time, it should output `8`, and so on. * Instead of printing `0`, the program should crash. Y...
[Question] [ You goal is to implement the operation of XOR ([carryless](http://en.wikipedia.org/wiki/CLMUL_instruction_set)) multiplication, defined below, in as few bytes as possible. If we think of bitwise XOR (`^`) as binary addition without carrying ``` 101 5 ^ 1001 9 ---- 1100 12 5^9=12 ``` ...
[Question] [ ## Task Given \$n\$, output position of the last odd digit in the decimal representation of \$2^n\$ (counting from the end). ## Rules * There are no odd digits for \$n=1,2,3,6,11\$ \$(2, 4, 8, 64, 2048)\$ - you may output anything that is not a positive integer for them (no need to be consistent). * Yo...
[Question] [ Suppose you are stringing a strand of [Froot Loops](https://en.wikipedia.org/wiki/Froot_Loops) for a necklace, bracelet, shoelace, or whatever. There are 6 loop colors: **r**ed, **o**range, **y**ellow, **g**reen, **b**lue, and **p**urple. You want your strand to start with red at the very left and cycl...
[Question] [ [Reproductive strategy of oozes](https://rpg.stackexchange.com/questions/4272/is-an-ooze-a-living-creature/4273#comment4503_4273) can be summarized as follows: > > o O 8 oo > > > A population of oozes at generation N is described by a string, for example: ``` ooooo88ooOoOo8Ooooo8OOoo8Oo8Oo8oo8ooooo...
[Question] [ ## The task In this challenge, your input is a non-empty list of positive integers, given in the native format of your language. Your output is that same list, in the same format, with some elements removed. You shall remove every occurrence of `1`, every second occurrence of `2`, every third occurrenc...
[Question] [ ### Objective Given a list of three-word passphrases, crack them all. Each time you guess, you will be given a clue in the style of [Mastermind](http://en.wikipedia.org/wiki/Mastermind_(board_game)), depicting how many characters match the password, and how many are in their correct position. The objec...
[Question] [ Output this 1364-digit base-10 number: ``` 10346063175382775954983214965288942351853612536382034663905935101461222060548195774084941504127779027795484711048746289269095513027910438498906751225648197766590064457965461314130149942152545074712074006545797623075756579902190433531325851645586375231773037880...
[Question] [ Write a program or function that takes in a positive integer (via stdin, command line, or function arg) and prints or returns a string of that many of these small triangles tiled together, alternating which way they point: ``` /\ /__\ ``` This sole triangle is the output if the input is `1`. If the in...
[Question] [ [Inspired by this challenge](https://codegolf.stackexchange.com/q/104785/32686) Given an integer in the range `0 <= n < 2**64`, output the minimum sized container it can fit in out of * bit: 1 * nibble: 4 * byte: 8 * short: 16 * int: 32 * long: 64 ## Testcases: ``` 0 -> 1 1 -> 1 2 -> 4 15 -> 4 16 -> 8 ...
[Question] [ iOS 11 has a bug [that makes the result of 1+2+3 to be 24](https://www.reddit.com/r/apple/comments/782250/try_quickly_typing_1_2_3_into_the_ios_11/?sort=old&sh=63028759&st=J93B9RWJ). This is related to the animation speed, but anyway: The task is to make `1 + 2 + 3 == 24`. But only that. So you should ...
[Question] [ # Introduction The current coronavirus disease is officially named **COVID-19**, from the 3 words **co**rona **vi**rus **d**isease, and the year 20**19**. (Technically it's coronavirus, making 2 words, but whatever...) Given this example, we can apply this naming convention to name other potential dise...
[Question] [ (Inspired by [this question](https://codegolf.stackexchange.com/q/80961/41505)) # Objective Your task is to write a program or function to print an ASCII version of the Stack Overflow logo to STDOUT ``` \|/ (-) (-) (-) (-) ``` Your program should take two inputs, referred to here as H and N. The heigh...
[Question] [ ## Rules You will start with only two elements: Points \$A\$ and \$B\$ such that \$A \neq B\$. These points occupy a plane that is infinite in all directions. At any step in the process you may do any of the three following actions: 1. Draw a line that passes through two points. 2. Draw a circle center...
[Question] [ Given a single letter from A to Z (except J and K) as input, output the smallest non-negative integer containing that letter in its written form. Assume numbers never contain the word "and", so `101` is "one hundred one", not "one hundred and one". Assume American (short-scale) counting, so one million...
[Question] [ *Inspired by [this comment chain](https://codegolf.stackexchange.com/questions/144318/how-many-chapters-do-i-have?noredirect=1&lq=1#comment353719_144318)...* > > I wanna [`enklact`](https://codegolf.stackexchange.com/a/141677/68615) my way out of this challenge but I can't... > > > @ETHproductions *...
[Question] [ I've recently been indulging myself in some nostalgia in the form of Bookworm Deluxe: ![](https://i.stack.imgur.com/c1x3x.png) In case you haven't seen it before, it's a word game where the goal is to connect adjacent tiles to form words. In order to determine whether a string is a valid word, it check...
[Question] [ For this challenge you need to implement two functions, **f** and **g**, on the integers, such that **f ∘ g** is a strictly decreasing function while **g ∘ f** is a strictly increasing function. In other words, if you take any two integers **a < b**, then **f(g(a)) > f(g(b))** and **g(f(a)) < g(f(b))**...
[Question] [ Everyone knows that the content makes the question. But a good title helps too, and that's the first thing we see. It's time to turn that first impression into a program, and figure out what kinds of titles get more upvotes. You are hereby challenged to write a program or function that takes the title ...
[Question] [ **Monday Mini-Golf:** A series of short [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenges, posted (hopefully!) every Monday. True story1: The other day, I was playing around on my tablet when I had the idea to visit [the page](http://www.webtoolkitonline.com/javasc...
[Question] [ # McCarthy's 1959 LISP In early 1959, John McCarthy wrote a groundbreaking paper defining just nine primitive functions that when put together still form the basis for all LISP-like languages today. The paper is available digitized here: **<http://www-formal.stanford.edu/jmc/recursive.pdf>** Your job ...
[Question] [ In his xkcd [about the ISO 8601 standard date format](https://xkcd.com/1179/) Randall snuck in a rather curious alternative notation: [![enter image description here](https://i.stack.imgur.com/b1ZUO.png)](https://i.stack.imgur.com/b1ZUO.png) The large numbers are all the digits that appear in the curre...
[Question] [ [Mafia](http://en.wikipedia.org/wiki/Mafia_(party_game)) (also known as Werewolf) is a party game that plays roughly like this: * The game begins on day 0. After every day `n` comes a night `n`. After every night `n` comes a day `n+1`. i.e. `D0, N0, D1, N1, D2, N2`... * At the dawn of day 0, a host sec...
[Question] [ Posted from [here](https://codegolf.meta.stackexchange.com/questions/2140/sandbox-for-proposed-challenges/17916#17916). This challenge is highly "distilled" from [this](https://codegolf.stackexchange.com/questions/188863/print-function-for-linked-list) question. Special thanks to @Akababa! In this task...
[Question] [ Full width text is text that has a space after every character, including the last one. For instance, the first sentence of this question becomes: ``` F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h ...
[Question] [ This challenge is quite simple. You will take an input which will be a year from 1801 to 2400, and output if it is a leap year or not. Your input will have no newlines or trailing spaces: ``` 1954 ``` You will output in any way that you like that clearly tells the user if it is or isn't a leap year (I ...
[Question] [ Recently I had the pleasure of writing a Haskell program that could detect if the `NegativeLiterals` extension was engaged. I came up with the following: ``` data B=B{u::Integer} instance Num B where{fromInteger=B;negate _=B 1} main=print$1==u(-1) ``` [Try it online!](https://tio.run/##LcqxCsIwEADQvV9x...
[Question] [ Many electronic devices, specially old ones, will show a blinking `12:00` when the time has not been set. The purpose of this challenge is to recreate this. Specifically, the task is to **display `12:00` and `--:--` alternatively in an infinite loop**. The **period** should be 1 second, divided evenly ...
[Question] [ **Short and sweet description of the challenge:** Based off [ETAOIN SHRDLU](http://en.wikipedia.org/wiki/ETAOIN_SHRDLU), your challenge is to write the shortest program or function in any language that outputs the 26 letters of the English alphabet based on their frequency in the input. **Really long...
[Question] [ A *palindrome* is some string that is spelled the same way both backwards and forwards. For instance, 'Eva, can I stab bats in a cave?' is a palindrome (EVACANISTAB | BATSINACAVE) For this code golf, using the language of your choice, determine if a given string is a palindrome or not. *Edge Cases:* * ...
[Question] [ # Main task Your task is to print out integers in descending order, starting from 1, and increasing as you keep hitting 1 again, up until the given input is reached, then, print out the rest until you hit 1 again. Example with input `6`: ``` 1 21 321 4321 54321 654321 Without newlines (valid output): 1...
[Question] [ **Challenge:** Create a program that accepts a positive integer and checks if it can be written in the form of (3^x)-1, where **X is another positive integer**. If it can, output X If it can't, output -1 or a [falsy](http://meta.codegolf.stackexchange.com/q/2190/34718) statement. **Example inputs/outpu...
[Question] [ ## Animate the text in your terminal **The goal** The goal is to "animate" the string "Hello world" in your output so that each character gets capitalised after each other. Your program can exit after each letter has been capitalised. For example; ``` # Iteration 1 Hello world # Iteration 2 hEllo worl...
[Question] [ > > This challenge has ended. To see the final scores of the competitors, [click here](https://chat.stackexchange.com/transcript/message/51317259#51317259) > > > In this challenge, each submission is one bot. Each bot should be a Javascript function. Bots will fight to obtain the highest total wort...
[Question] [ The Champernowne constant is a number that is constructed by concatenating the first `n` numbers, with `n` tending to infinity. It looks something like this: ``` 0.123456789101112131415161718192021222324252627282930... ``` Now, I will describe to you the *Rien* number. It can be thought of as a minimiz...
[Question] [ This challenge is to write a program or script which counts the sum of all digits within the integers from 1 up to and including a given number. Input, one positive integer. Output, the sum of digits in that number and all smaller numbers. Examples: ``` Input: 5 Integer Sequence: 1, 2, 3, 4, 5 Sum of ...
[Question] [ ### Introduction The [Atari ST](https://en.wikipedia.org/wiki/Atari_ST) was a rather popular personal computer from the mid 80's to early 90's era, powered by a Motorola 68000 microprocessor. On this machine, the default behavior of the operating system for uncaught CPU exceptions was to display a row ...
[Question] [ # [Loves me, Loves me not](https://en.wikipedia.org/wiki/He_loves_me..._he_loves_me_not) This simple kids' game is old, but still popular. Since we are living in 21st century now, let's digitize it! # Specification Program must take no input, unless you are using a language that can't generate random s...
[Question] [ Creating a golfing language can be hard. Let's help budding golfing language creators out and provide some helpful tips on how to create one. I'm looking for tips on: 1. The design process 2. Implementation 3. Community engagement One tip per answer would be appreciated, and tips like "don't create a n...
[Question] [ There is a rather curious number which shows up sometimes in math problems or riddles. The pseudofactorial(N) is the least (i.e. lowest) common multiple of the numbers 1 through N; in other words, it's the lowest number which has all numbers from 1 through N as factors. For instance pseudofactorial(7) ...
[Question] [ As you should (hopefully) know, [a radiation hardened quine](https://en.wikipedia.org/wiki/Quine_(computing)#Radiation-hardened) is a quine that you can remove any one character from and still print its original, pre-modified source. The thing is, with most of these you can only remove one character; o...
[Question] [ ## Background As you probably learned in biology class, DNA and RNA are composed of strands of nucleotides; each nucleotide consists of a chemical called a base together with a sugar and a phosphate group. The information stored in the DNA or RNA is coded as a sequence of bases. DNA uses the bases A, C...
[Question] [ Given two integers, A and B, output A if A-B (A minus B) is in A-B (A to B), otherwise output B. "A minus B" is standard subtraction. "A to B" is the range of integers starting at A and ending at B, including both A and B. For example: ``` 1 to 4: 1, 2, 3, 4 -2 to 5: -2, -1, 0, 1, 2, 3, 4, 5 3 to -1: 3...
[Question] [ [Related.](https://codegolf.stackexchange.com/questions/42580/shorter-than-a-split-second) Given a printable ASCII string, split it into a list of non-empty strings with a new sub-string beginning every time a character, which has not previously been seen in the same case, occurs. ### Examples ``` "mis...
[Question] [ In the arcade version of the game, Pac-Man eats pac-dots. However, in this challenge, he's hungry for alphanumeric characters and punctuation in a string. Your task is to create a function that feeds Pac-Man a string, evaluates if he can eat it or not, and returns the string with Pac-Man's location in ...
[Question] [ Your task is to print the hexidecimal times table: ``` 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 02 04 06 08 0a 0c 0e 10 12 14 16 18 1a 1c 1e 00 03 06 09 0c 0f 12 15 18 1b 1e 21 24 27 2a 2d 00 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c 00 ...
[Question] [ As part of [his answer to *Make an Error Quine!*](https://codegolf.stackexchange.com/a/36262), @Falko proposed the following algorithm: > > ## How to create your own solution in 2 minutes? > > > 1. Open a new file in an IDE of your choice. > 2. Bang your head onto the keyboard in front of you. > 3. ...
[Question] [ You should write a program or function that given a list of positive integers multiplies each element with the smallest positive integer possible to create a strictly increasing list. For example if the input is ``` 5 4 12 1 3 ``` the multiplications will be ``` 5*1=5 4*2=8 12*1=12 1*13=13 3*5=15 ``` a...
[Question] [ ### Background Summer is well over in the Northern Hemisphere, and a lot of us miss the sun, the beaches, the waves of the ocean... This challenge aims at cheering them up by reminding them of the sea. ### The challenge Here is the sea : ``` ** ** ** ...
[Question] [ Your goal is to display ASCII art of a formation in [ten-pin bowling](http://en.wikipedia.org/wiki/Ten-pin_bowling) where only some of the pins remain. Fewest bytes wins. The tens pins are in a triangular formation: ``` O O O O O O O O O O ``` Pins are labelled from 1 to 10 as: ``` 7 8 9 10 4 5 ...
[Question] [ The [Shotgun numbers](https://oeis.org/A064494) are a sequence with a rather simple definition but some interesting structure. Start with the natural numbers: ``` 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ... ``` Now take all numbers at indices divisible by **2**, group the...
[Question] [ ## Introduction We all know prefixes and suffixes. But there are other types of affixes that exist too. Such as circumfixes, a type of affix that has two parts, one of which is a prefix and another of which is a suffix. Figuring out whether some string is a prefix or a suffix of some other string is ea...
[Question] [ Write a full program or a function that takes a positive integer `N` as input via STDIN/command line/ARGV or function arguments and prints an ASCII double knot corresponding to the `N` to STDOUT. The ASCII double knot looks like this: ``` __ __ __ __ __ __ / \/ \/ \/ \/ \/ \ | /\/ /\/ /\/...
[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 last year. T...
[Question] [ Your task is to create a program that is to mimic [Big Ben (Twitter)](https://twitter.com/big_ben_clock). ### Task Whenever a new hour has begun (according to your computer's local time or UTC), you have to output `BONG` repeated `hour` times (with a space between the words). For example, when it's 3 o...
[Question] [ Given a text like this: ``` # #### ## # ## # ## # #### ## ``` Output the same text but by connecting the pixels with the characters `─│┌┐└┘├┤┬┴┼`. If a pixel doesn't have any neighbours, don't change it. So the output of the last text is: ``` │ ─┬── ┌─ │ └─ │ ┌┘ │ └──┘ ─┘ ``` * You can take...
[Question] [ The purpose of this challenge is to graphically depict a walk on the plane, where the direction of each step \$k\$ is determined by the primality of \$k\$ and the parity of its binary expansion. Specifically, * **Initial** direction is fixed, say North. * All steps have the same **length**. * The **dir...
[Question] [ Skittles are colored candy where there are 5 distinct flavors; grape, green apple, lemon, orange, and strawberry represented by (p)urple, (g)reen, (y)ellow, (o)range, and (r)ed respectively. I used to eat skittles by sorting all the different colors, then eating them in sequence. After getting a few we...
[Question] [ While writing my essay for Shakespeare, I realized that I needed to shorten my quote references to more manageable lengths. I had previously been writing this: ``` (Act 1, Scene 2, Lines 345-346) ``` But I've now been told to write them like this: ``` (I.ii.345-6) ``` Clearly, I need some golfed code t...
[Question] [ ### Why a Simulator? Kids these days don't have the time nor the ambition to actually go and stack boxes on the see-saw or play around with balancing physical objects. This leaves lots of room in the software market for a Lever Simulator which will, according to my models, sell like mad! ### Programmin...
[Question] [ The French [spell out numbers](https://codegolf.stackexchange.com/q/35435/31516) in a peculiar way. * **1-16** are "normal" * **17-19** are spelled out **10+7. 10+8, 10+9**. * **20-69** are "normal" (OK, OK! Not really, but they are in this challenge) * **70-79** are **60+10, 60+11 ... 60+10+7, 60+10+...
[Question] [ [Hex triplets](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) such as [`#ffffff`](http://www.color-hex.com/color/ffffff) (white) or [`#3764ef`](http://www.color-hex.com/color/3764ef) (blueish) are often used to denote RGB colors. They consist of `#` followed by six hexadecimal digits (0-f), or s...
[Question] [ A "simple circular" word is a word whose chords do not intersect. The chords of a word may be seen by laying out the alphabet in a circle, and then connecting the word's consecutive letters. ## Examples of Simple Circular Words **ROLE** [![ROLE](https://i.stack.imgur.com/v0Flm.png)](https://i.stack.im...
[Question] [ An aesthetically pleasing divisor tree is a tree of divisors of input `n` that, for any composite number `m`, has two children nodes that are the **pair of divisors** that are closest to the **square root** of `m`. The left node should be the smaller divisor of `m` and the right node should be the larg...
[Question] [ Sometimes I need to write more documentation than just comments in code. And sometimes, those explanations need screenshots. Sometimes the conditions to get such a screenshot are so weird that I ask a developer to take a screenshot for me. Sometimes the screenshot does not fit my specifications and I h...
[Question] [ Stackylogic is a logic-based programming language I made up that take in `0`'s and `1`'s for input and outputs a single `0` or `1` upon completion. A Stackylogic program consists of lines that can only contain the three characters `01?` as well as exactly one `<` at the end of one of the lines. Lines m...
[Question] [ A standard, solved, 3×3×3 [Rubik's Cube](https://en.wikipedia.org/wiki/Rubik%27s_Cube) has 6 differently colored faces, where each face is a 3×3 grid of squares of one color. The white face is opposite the yellow, the red opposite orange, the blue opposite green, and when white points upward, red is to...
[Question] [ # Background As most PPCG regulars will know, a [quine](/questions/tagged/quine "show questions tagged 'quine'") is a program which outputs its own source code when run; and the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) between two strings is the minimum number of inser...
[Question] [ Write a program (or function) that takes in a non-empty string of any [printable ASCII](https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters) characters. Print (or return) a zigzagging chain of the characters in the string with every neighboring pair of characters linked by: * `/` if the firs...
[Question] [ # Task Your task is to write a function or a program in a language of your choice that analyzes a couple of statements and determines whether it can be concluded from those statements that pigs are able to fly. # Input The input is a String that can be read from STDIN, taken as a function argument or e...
[Question] [ Write two rectangular blocks of code, each *w* characters wide and *h* characters tall, that implement [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) when arranged in a grid. (*w* and *h* may be any positive integers) For example, the two code blocks might be: (*w* = 3, *...
[Question] [ You are Ruby, a railway engineer. Your task is to lay track in any given valley such that it visits every station (`M`). The amount of track laid is not important, but it must be laid in one continuous path which starts and ends at the valley entrance/exit point (`>`) and does not, at any point cross i...
[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/38534/edit). Closed 5 years ago. [Improve this question](/posts/38534/edit) ...
[Question] [ Given a string as input, output a number of whitespace characters (0x0A and 0x20) equal to the length of the string. For example, given the string `Hello, World!` your code would need to output exactly 13 whitespace characters and nothing else. These can be any mix of spaces and newlines. Your code sho...