text
stringlengths
180
608k
[Question] [ Your should write a program or function that determines the language of a given word. The task is to recognize some of the 5000 most common words in 4 languages: * English * German * Italian * Hungarian The word lists can be found [in this GitHub repository.](http://github.com/randomra/languages) You a...
[Question] [ Given an input of a series of characters representing movements on a hexagonal grid, output the final coordinates of the "pointer." Our hexagons will be numbered like so (imagine a rectangular grid with every odd-numbered column shifted downwards slightly): ``` _____ _____ _____ ...
[Question] [ One of the reasons I've always loved Pokemon is because for such a simple-seeming game, it has so many layers of complexity. Let's consider the move Hidden Power. In game, the type and power (at least before Generation VI) of Hidden Power is different for every Pokemon that uses it! That's pretty cool,...
[Question] [ # Untouchable Numbersα An untouchable number is a positive integer that cannot be expressed as the sum of all the proper divisors of any positive integer (including the untouchable number itself). For example, the number 4 is not untouchable as it is equal to the sum of the proper divisors of 9: 1 + 3...
[Question] [ My attempt at stating [this question](https://codegolf.stackexchange.com/questions/5693/minimal-sudoku-generator), but with a more objective solving criterion. Your task is to build a program or function that takes a solved Sudoku grid `S` in the format of your choice and attempts to generate a problem...
[Question] [ Write a program or function that takes in a positive integer N, and prints or returns an N×N ASCII art string whose top half is a semicircle made of `(`'s and whose bottom half is a downward-pointing triangle made of `V`'s, with spaces used as padding. In other words, make an ASCII ice cream cone: (out...
[Question] [ Your task is to calculate the total number of key-presses required to enter a given text on an old cellphone. The keymaps are: ``` 1:1 2:abcABC2 3:defDEF3 4:ghiGHI4 5:jklJKL5 6:mnoMNO6 7:pqrsPQRS7 8:tuvTUV8 9:wxyzWXYZ9 0:<space><newline>0 ``` To type `exaMPle TExt 01` , you would press `33 99 2 6666 77...
[Question] [ The 32-point compass is... interesting, to say the least. ![image](https://i.stack.imgur.com/EOeku.png) By Denelson83 (Own work) [[GFDL](http://www.gnu.org/copyleft/fdl.html) or [CC-BY-SA-3.0](http://creativecommons.org/licenses/by-sa/3.0/)], via [Wikimedia Commons](http://commons.wikimedia.org/wiki/Fi...
[Question] [ This challenge is a *cut'n paste* from [Enlarge ASCII art](https://codegolf.stackexchange.com/q/19450/9424), but *reversed*, using [*PetSCII*](https://en.wikipedia.org/wiki/PETSCII) based *half-block* chars: ``` string=" ▝▘▀▗▐▚▜▖▞▌▛▄▟▙█" ``` There, [*PetSCII*](https://en.wikipedia.org/wiki/PETSCII) is ...
[Question] [ The way points are assigned on a dice follows a regular pattern, the center dot is present if and only if the number is odd. To represent the even numbers, pairs of dots on opposite sides of the center are added, which will stay present for all successive numbers. ``` 1: O 2: 3: 4: 5: 6: O ...
[Question] [ We are probably all used to the English alphabetical order: ``` A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ``` When we compare words in English for the sake of alphabetization we first compare the first letter, whichever word has the later first letter comes later. If they are the same we chec...
[Question] [ ## Background A **maximal domino placement** (MDP) on a rectangular grid is a non-overlapping placement of zero or more dominoes, so that no more dominoes can be added without overlapping some existing domino. Alternatively, it can be thought of as a tiling using dominoes and monominoes (single square ...
[Question] [ Inspired by [this question](https://puzzling.stackexchange.com/questions/93177/minigolf-solitaire/) on the puzzling stack exchange. ## Rules Given 5 stacks of 5 cards with numbers from 1 to 7, output the moves needed to empty all stacks. A move is defined as the index of a column to pull the card off ...
[Question] [ **This question already has answers here**: [Do you want to code a snowman?](/questions/49671/do-you-want-to-code-a-snowman) (29 answers) Closed 4 years ago. Today is Halloween and it's time to carve some pumpkins! ``` & ((^.^)) ``` Given an input integer, string, list of integers, etc., outp...
[Question] [ # Introduction It is somewhat like [DVORAK Keyboard layout](https://codegolf.stackexchange.com/questions/22704/dvorak-keyboard-layout) , but MUCH harder. Let's talk about the Korean keyboard first. As you can see in [Wikipedia](https://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29), the...
[Question] [ ### Kids-related intro Whenever I take my kids to an amusement park, the kids get more nervous the closer we are to the park, with the nerve peak when we are in the parking lot and find no place to park. So I've decided I need a method to find the closest free parking space to minimise the time spent p...
[Question] [ # Note This is the encryption challenge. The decryption challenge can be found [here](https://codegolf.stackexchange.com/questions/209945/lets-decrypt-it). # Challenge The challenge is to encrypt a given string, using the rules as specified below. The string will only contain **lowercase alphabets**, *...
[Question] [ # The Challenge Given a string indicating the symbolic notation of UNIX permission of a file and its ownership (user ID and group ID), decide whether a given user `A` has permission to read / write / execute it. *[Related](https://codegolf.stackexchange.com/questions/93099/decode-the-chmod).* ## Permis...
[Question] [ *This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") if you are not familiar with the format click the tag to go to the wiki. There will not be a robbers' thread for this question.* # Cops Your task as Cops is to select two sequences from the [Onl...
[Question] [ ## Introduction The *perimeter density matrix* is an infinite binary matrix **M** defined as follows. Consider a (1-based) index **(x, y)**, and denote by **M[x, y]** the rectangular sub-matrix spanned by the corner **(1, 1)** and **(x, y)**. Suppose that all values of **M[x, y]** except **Mx, y**, the...
[Question] [ *(inspired by [this question](https://math.stackexchange.com/q/1886327) over on Math)* ### The Definitions Given an `n x n` square matrix **A**, we can call it [`invertible`](https://en.wikipedia.org/wiki/Invertible_matrix) if there exists some `n x n` square matrix **B** such that **AB** = **BA** = **...
[Question] [ Or maybe it's not really a labyrinth, but still. Rules: 1. **Input** is a two-line string, consisting of `*`, `1`, `x` and `X`. That string is a labyrinth to walk through. The lines have the **equal length**. You could take the input as a string with `,` (comma) or any convenient separator between thes...
[Question] [ Alice and Bob are playing a little game. First, they draw a tree from a root node (indicated by a thick dot), with no internal nodes, with numbers at the leaves. Any node may have any number of children. [![tree](https://i.stack.imgur.com/633rW.jpg)](https://i.stack.imgur.com/eItFV.png) We start at the...
[Question] [ # Challenge Your task is to output the time (in 12 hour time) in ascii art. All characters that will be used are as follows: ``` ___ __ ___ ____ _ _ _____ __ ______ / _ \ /_ | |__ \ |___ \ | || | | ____| / / |____ | | | | | | | ) | __) | | || |_ | |__ / /_...
[Question] [ # Challenge: Some ascii-art is a pain to make, but makes code comments easier to read, especially when the code is dense. The challenge is to make a simple tool that converts comments to simple ascii-art with arrows. The comments to modify are delimited by empty comments. For example, supposing Haskell...
[Question] [ Time for a new [typography](/questions/tagged/typography "show questions tagged 'typography'") challenge! It’s a common problem when copy-pasting between various document formats: hyphenation. While it reduces the raggedness of a left-aligned layout or evens spacing in a justified layout, it’s a comple...
[Question] [ RoboCritters ([etymology](http://chat.stackexchange.com/transcript/message/21989912#21989912)) is a brand new [esoteric programming language](https://esolangs.org/wiki/Main_Page) (don't bother searching for it, I just invented it). It's a [variant](https://esolangs.org/wiki/Category:Brainfuck_equivalen...
[Question] [ ## Preface As I was shooting an archery 900 round earlier today (10 ends at 6 arrows an end, and 10 ends at 3 arrows an end, for a total of 90 arrows and a maximum score of 900), I thought of this challenge. In archery (assuming that you are shooting on a FITA supplied *target face* [the piece of paper...
[Question] [ I've got a tough one for you! My girlfriend recently came across a new show on MTV (USA). It's a terrible show, and everyone on it is trashy, but the "game" is pretty interesting. From Wikipedia: > > **Are You The One?** follows 20 people who are living together in Hawaii to find their perfect match....
[Question] [ *Bracket numbers* provide a simple way to express large integers using only left bracket, space, and right bracket (`[ ]`). A bracket number is defined as a string of one or more pairs of matching brackets `[...]` called *chunks*, each separated from its neighbors by zero or more spaces. The number of ...
[Question] [ You are given two regexes and your task is to determine if the strings matched by the first regex are a subset of the strings matched by the second regex. For this we are going to use a limited mathematical definition of a regex. A regex is defined recursively as one of: * `ε` - This matches only the s...
[Question] [ Given an ASCII-art shape made of the characters `/\|_`, your challenge is to return the number of sides it has. A side is a straight line of one of those, for example: ``` \ \ \ / / | | | | _____ ``` Are all sides. For example, this shape: ``` ___ / \ /_____\ ``` Has *four* sides. You can assu...
[Question] [ *Inspired by my geography class*, [*Sandboxed*](https://codegolf.meta.stackexchange.com/questions/2140/sandbox-for-proposed-challenges/23999#23999) Simulate weathering / erosion. ### Input Input will be given as a string of any 2 characters (or see below) you like in the shape of the rock (here i use s...
[Question] [ Forth is one of the few non-esoteric stack-based languages. For this challenge, we will use a small subset of Forth, which simply executes a sequence of words in a linear fashion — without any definitions or loops. In good Forth code, each word definition includes a **stack effect** comment, which expl...
[Question] [ *Blokus* is a board game in which players take turns placing pieces on a \$ n \times n \$ square grid. In this version of the game, there will be just one person playing. The person is given \$ 21 \$ unique [polyominoes](https://en.wikipedia.org/wiki/Polyomino), ranging from \$ 1 \$ to \$ 5 \$ tiles ea...
[Question] [ Given a sequence of base-10 digits, output the longest list of integers that contains all the digits exactly once, in the order in which they appeared in the input, without repeating any integers. # Examples ``` Input: 12345 Output: [1, 2, 3, 4, 5] Input: 12123 Output: [1, 2, 12, 3] Input: 10010 Output...
[Question] [ Inspired by [this lumosity mini game, Pinball Recall](https://www.lumosity.com/brain-games/pinball-recall) We start with a rectangular grid (viewed from above) with several bumpers as follows. Entrances/exits are numbered counter-clockwise starting from the leftmost of the bottom of the grid, as number...
[Question] [ I really like times that follow certain patterns. In particular, I like times where all the digits are the same, or all of the digits increase arithmetically by one from left to right. Further, I viscerally hate when people put letters in my times, so all of that AM/PM nonsense is dead to me. Thus, my ...
[Question] [ Write a program or function which, given a *non-empty* sequence of right or left turns, outputs the length of the shortest self-avoiding path on a 2D lattice with those turns. The input should be taken as a string, with each character being `R` or `L` for a right or left turn respectively. The output s...
[Question] [ Today you will be doing another palindrome challenge! So, your task today is to take a string, and determine the minimum amount of letters required to insert to turn it into a palindrome. For example, let's take the string `fishes`. In this, case the best way would be to add `h if`, so the result would...
[Question] [ In Chinese, numbers are written as follows: `1 一` `2 二` `3 三` `4 四` `5 五` `6 六` `7 七` `8 八` `9 九` `10 十` For numbers above 10, it is expressed as the number of tens and the number of ones. If there is only one ten, you do not need to explicitly say one, and if there are no ones, you don't need to put a...
[Question] [ A room can be made up of connected rectangles, for instance an L-shaped room. Such a room can be described by a list of dimensions describing the size of each rectangle. Assume you have two input lists. The first contains the width of rectangles stacked vertically over each other. The second contains ...
[Question] [ Given an input of an ASCII art "road," output the road with all dead ends labelled. This is a road: ``` ########.....######..#..### #......#######....#..#..#.# #.##......#...#####..#..### #..#####..#....#..#######.# #......#...#####.....##...# #..###.#...#...###...#..### ##########.#..#..##..#.##.# ..#...
[Question] [ As I have seen many questions asking tips for golfing in their interested language, I decided to ask for my favorite language: Groovy. People can give some tips and tricks that will be used in golfing with Groovy. [Answer] I'm new to this whole golfing thing, this is what I got so far: Use Closure...
[Question] [ [![Two-cube calendar](https://i.stack.imgur.com/J8ryq.jpg)](https://i.stack.imgur.com/J8ryq.jpg) Credit: [Marco Verch](https://foto.wuestenigel.com/day-31-of-december-set-on-wooden-calendar/) [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/) A two-cube calendar, as shown in the picture, uses tw...
[Question] [ [Gemtext](https://communitywiki.org/wiki/GemText) is a very simple markup format used by the alternative web protocol Gemini. Write a Gemtext to HTML converter. From the Wiki: > > A line of text is a paragraph, to be wrapped by the client. It is is > independent from the lines coming before or after i...
[Question] [ Your task is to write a program or function that determines whether a number is divisible by another. The catch is that **it should give an answer as soon as possible**, even if not all digits of the number have been given. Your program should take an integer *D* ≥ 2 and then a series of digits as inpu...
[Question] [ # I forgot towel day [Sandbox link](https://codegolf.meta.stackexchange.com/a/16511/77963) [PHP script for both examples (error, formatting the string)](https://tio.run/##pZHBT8IwGMXP9K/40ixhwASH8QSVgxqvJB48LAuprNuabGvTVqcIfzu2DAlDiAd32Lp87/feaytzuZ3OZC4BjUYeVdk7icIAMAXNS1kwKJnWNGOwpBVoQz@h5ia3wxXD8QSh...
[Question] [ # Task * Take input string separated by space. * Sort the words alphabetically. * Print them out vertically in 3 columns separated by space(s). # Challenge * All three column's heights should be as evenly weighted as possible. * All three column's should be left aligned. This is [code-golf](/questions/...
[Question] [ ### Input: A string ### Output: 1) First we take remove character at the end of the input-string until we are left with a length that is a square (i.e. 1, 4, 9, 16, 25, 36, etc.) So `abcdefghijklmnopqrstuvwxyz` (length 26) becomes `abcdefghijklmnopqrstuvwxy` (length 25). 2) Then we put this in a squa...
[Question] [ There was recently (a few years back) some buzz on [programming](http://www.i-programmer.info/news/167-javascript/3799-tetris-in-140-bytes.html) [websites](http://developers.slashdot.org/story/12/02/19/1351213/tetris-in-140-bytes) about an implementation of [Tetris in 140 Bytes](https://gist.github.com...
[Question] [ # Task Given a ASCII diagram of a loop *e.g.* ``` .................... ......@@@@@......... ......@...@......... .....@@...@@@@@..... ....@@........@..... ....@........@@..... ....@@@@@@@@@@...... .................... .................... ``` And a location on the loop *e.g.* ``` (7,1) ``` You must fin...
[Question] [ Given an input of a list of blocks to drop at certain points, output the height of the resulting "tower." The best way to explain this challenge is by example. The input will be a list of *2n* integers representing *n* blocks. The first integer is the block's x position, 0-indexed, and the second is ho...
[Question] [ This is a loose continuation of [my earlier challenge on constructing graphs](https://codegolf.stackexchange.com/questions/42890/construct-a-graph). # Background An eccentric artist has hired you to estimate the structural integrity of his sculptures. He creates his works of art by taking a bunch of cu...
[Question] [ # Pathological Sorting Your boss has demanded that you develop a sorting algorithm to improve the performance of your company's application. However, having written the application, you know that you're unlikely to be able to make it significantly faster. Not wanting to disappoint your boss, you've dec...
[Question] [ Create the shortest function to convert a string of [Roman numerals](http://en.wikipedia.org/wiki/Roman_numerals) to an integer. The rules for each letter can be found at the [Wikipedia page](http://en.wikipedia.org/wiki/Roman_numerals). Letters above 1,000 will have parentheses placed around them to s...
[Question] [ We once [made a Hexagony template without actually knowing it](https://codegolf.stackexchange.com/q/104604/78410). But after a bit of experience with Hexagony, it becomes apparent that it is not enough; sometimes the source code is too short for the given hexagon, and you get totally unexpected results...
[Question] [ ## Challenge Build the [Wheat Wizard's stove](https://codegolf.stackexchange.com/q/218360/78410) using 2-input NAND gates. The solution with the fewest NAND gates wins. Externally, it works in the following way: (the first line is added from the original spec for physical output) * It has 10 levels, fr...
[Question] [ ## Background [**Mastermind**](https://en.wikipedia.org/wiki/Mastermind_(board_game)) is a game of code-breaking for two players. One of the players is *codemaker* (Alice) and the other is *codebreaker* (Bob). 4x4 means that the player should guess the length-4 sequence made of four alphabets (say `RGB...
[Question] [ # Introduction A picross, also known as a nonogram, is a logic puzzle in which the player is given an initially blank grid and must shade in particular boxes on the grid to reveal an image. Numbers are written on the top and the left side, and they explain the image's coloration: each number correspond...
[Question] [ [Toki](https://en.wikipedia.org/wiki/Toki_Pona) [Pona](http://tokipona.net/tp/janpije/okamasona.php) is a linguist's code golf: A minimalist language with a vocabulary of around 120 words. Because of this, it has very few grammatical irregularities found in other languages, making it ideal for a code g...
[Question] [ ## Challenge: **Input:** Three integers: bottom-edge length; starting amount of grains of sand; index **Output:** Output the state of the bottom part of an hourglass at the given index, based on the given bottom-edge length and amount of grains of sand. ## Challenge rules: * We simulate the grains of s...
[Question] [ ### Background After applying the BWT (as seen in [Burrows, Wheeler and Back](https://codegolf.stackexchange.com/q/51397)) and the MTF (as seen in [Move to the printable ASCII front](https://codegolf.stackexchange.com/q/52592)), the [bzip2](https://en.wikipedia.org/wiki/Bzip2) compressor applies a rath...
[Question] [ [Atomic chess](https://en.wikipedia.org/wiki/Atomic_chess) is a (very fun) variant of chess in which every capture causes an "explosion," destroying the captured piece, the piece doing the capturing, and all non-pawns in a 1-square radius. The goal of this challenge is not to play an entire game of ato...
[Question] [ As the band's roadie, you have to pack the truck. Your program will place the packages so that they fit in the smallest height. ## A badly packed truck ![Badly packed truck](https://i.stack.imgur.com/Dyr90.png) ## Rules Packages may be rotated through multiples of 90 degrees. Packages may touch but mus...
[Question] [ ## Introduction This is one of my favorite math puzzles. Given a digit (say 3) and the number of times to use that digit (say 5), generate 10 expressions which result to 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 using just +, −, ×, ÷, ^ and √ (root) (brackets are allowed to group operations). For example: ``` (...
[Question] [ As we all know, limericks are short, five-line, occasionally-lewd poems with an AABBA rhyming scheme and an anapestic meter (whatever that is): > > Writing a Limerick's absurd > > Line one and line five rhyme in word > > And just as you've reckoned > > They rhyme with the second > > Th...
[Question] [ The Nonary Game is a fictional game played in the video game trilogy of the same name. Your goal is to find how many players (at best) can escape a given game, in as few bytes of code as possible. ## Rules of the game * There are 9 players, numbered 1 to 9. * All players start in the same room. * There...
[Question] [ # Who are they? Primus-Orderus Primes (POP) are primes which contain their **order** in the sequence of primes. So the `nth` prime, in order to be POP, must contain all the digits of `n` in a certain way which I'll explain. # Examples Let's get things clearer: All digits of `n` must appear among the ...
[Question] [ Let us say a substring is any continuous section of an original string. For example `cat` is a substring of `concatenate`. We will say that a *proper* substring is a substring that is not equal to the original string. For example `concatenate` is a substring of `concatenate` but not a proper substring....
[Question] [ A stack state diagram shows how the values on one stack are changed into the other. For example, this is a stack state diagram: ``` 3 0 2 1 0 ``` This means that there is a stack initially containing 3 values (the `3` part). These values are indexed from 0 to 2, with 0 at the top: `2 1 0`. The next par...
[Question] [ Snakes look like this: ``` >>>v @ ^ v ^ >>>^ v ^ v ^<<<<<<<<< ``` The snake can cross over itself as in this case: ``` @ ^ >^>v ^<< ``` For a crossover to be valid, the characters on either side must be moving the same direction. The case of ``` @ >^v ^< ``` can be considered u...
[Question] [ The first programming language I was exposed to was [Sinclair BASIC](https://en.wikipedia.org/wiki/Sinclair_BASIC). Like many BASIC dialects, it requires all [source code lines to be numbered](https://softwareengineering.stackexchange.com/questions/309767/why-did-basic-use-line-numbers). As a result, u...
[Question] [ Write a program or function that takes in a nonempty list of [mathematical inequalities](https://en.wikipedia.org/wiki/Inequality_(mathematics)) that use the less than operator (`<`). Each line in the list will have the form ``` [variable] < [variable] ``` where a `[variable]` may be any nonempty strin...
[Question] [ ### Preamble In Stack Exchange markdown, we use \*\* to bold out text. For example, this markdown: ``` The **quick brown fox jumps over the lazy** dog. ``` Renders as: > > The **quick brown fox jumps over the lazy** dog. > > > Of course, we use \*\* to close boldness as well. So less of the answer ...
[Question] [ We have 40 sticks of same widths but different heights. How many arrangements are there possible to put them next to each other so that when we look from right we see 10 sticks and when we look from left we again see exactly 10 sticks? For example such an ordering is:![An example ordering](https://i.s...
[Question] [ Surprisingly, we haven't had any challenges on graph colouring yet! Given an undirected graph, we can give each vertex a colour such that no two adjacent vertices share the same colour. The smallest number *χ* of distinct colours necessary to achieve this is called the *chromatic number* of the graph. ...
[Question] [ I hate code bloat! So I have decided to replace my Windows 7 system by a golfed version. However, I know that it is not easy, so let's build a prototype first. It will take a list of windows from the user and show them using a pseudo-graphic display on the standard output. For example: user input: ``` ...
[Question] [ In [this question](https://codegolf.stackexchange.com/questions/2357/1p5-iterated-prisoners-dilemma), a game was devised in which players would face each other off pair by pair in the Prisoner's Dilemma, to determine which iterative strategy scored the highest against others. In [this question](https:/...
[Question] [ Given is a board of variable size with a maximum size of 5 times 5 fields. Every field kann be filled with an 'x'. If it is not filled with an 'x', it is filled with an 'o'. The starting state of every board is given (see below). With each board, 10 rounds have to be played (at max, conditions: see bel...
[Question] [ ## Background *Flow Free* is a series of puzzle games whose objective is to connect all the same-colored pairs of dots on the grid. In this challenge, we consider the original game on a rectangular grid (no variations like bridges, warps, or hexagonal grids). A puzzle in *Flow Free* might look like thi...
[Question] [ It's a funny accident that this world happens to have just 1 time dimension, but it doesn't have to be like that. It's easy to imagine worlds with 2 or more time dimensions, and in those worlds you could build computers and run software on them, just like in this one. **The System** Here is a system fo...
[Question] [ Here's an ASCII pumpkin carved into a Jack-o-Lantern. Isn't it cute? ``` ((^v^)) ``` Here's an ASCII ghost. Look how spooky it is! ``` \{O.O}/ ``` Obviously, the pumpkins have to be on the ground, with a space between them so they don't rot. Ghosts, however, like to stand on top of pumpkins, so they're...
[Question] [ A nearly massless cat is dropped in space (don't worry, with a space suit and everything) at the point `(x, y, z)` with velocity `(vx, vy, vz)`. There is an fixed, infinitely dense planet (with volume of 0) at the point `(0, 0, 0)` and it attracts objects at distance `r` with acceleration `1/r^2`. Acco...
[Question] [ [Van der Waerden's theorem](https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem) says that > > For any given positive integers `r` and `k`, there is some number `N` such > that if the integers `{1, 2, ..., N}` are colored, each with one of `r` > different colors, then there are at least `k` in...
[Question] [ From a challenge in a programming book long ago, PNZ is a game where the user must guess three unique digits in the correct order. **Rules**: 1. A random 3 digit number with no repeating digits is generated. (This is what the user is trying to guess) 2. The user inputs a guess of 3 digits, which is to ...
[Question] [ ### Introduction For the ones wondering what [Befunge](https://esolangs.org/wiki/Befunge) exactly is, it is a two-dimensional stack based language made in 1993 by Chris Pressy. I made **7 brain teasers** that need to be solved in **Befunge-93**. This is quite an experimental challenge, but I thought it...
[Question] [ A top-front-side puzzle is a puzzle where you are required to construct a 3-D shape of (usually cubic) blocks given three orthogonal views: a top view, a front view, and a side view. For example, given a top, front, and side view as follows: ``` Top: Front: Side: . . . . . . . . . ....
[Question] [ Following on from the [third order quine](https://codegolf.stackexchange.com/questions/4171/write-a-third-order-quine) challenge, your task is to write an [Ouroboros](http://en.wikipedia.org/wiki/Ouroboros) program that uses as many languages as possible. That is, in language A, write a program pA whic...
[Question] [ The recent volume of MAA's Mathematics Magazine had an article "[Connecting the Dots: Maximal Polygons on a Square Grid](https://doi.org/10.1080/0025570X.2021.1869493)" by Sam Chow, Ayla Gafni, and Paul Gafni about making (very convex) \$n^2\$-gons where each vertex is a different point of the \$n \tim...
[Question] [ Inspired in part by [this Mathologer video on gorgeous visual "shrink" proofs](https://youtu.be/sDfzCIWpS7Q?t=799), and my [general interest](https://codegolf.stackexchange.com/q/204419/53884) [in the topic](http://oeis.org/wiki/User:Peter_Kagey), this challenge will have you count regular polygons wit...
[Question] [ In Vim, you can repeat a command by preceding it with a number, like `3dd` is equivalent to `dd dd dd`. Well, this repeating pattern is not restricted to Vim commands. String can be replicated in this way, too. ### Specification: Given a string, consisting of only digits, alphabetical characters (both ...
[Question] [ I am too bored and want a challenge to solve. But I do not see any interesting challenges, and I am too lazy to search for one. Can you (Well, technically your code) suggest me one? --- # I/O **Input:** None. **Output:** A link to a random open(i.e. non-closed) challenge("Challenge" excludes [tips](/qu...
[Question] [ ## Introduction In this challenge, we will be dealing with a certain infinite undirected graph, which I call the *high divisor graph*. Its nodes are the integers starting from 2. There is an edge between two nodes **a < b** if **a** divides **b** and **a2 ≥ b**. The subgraph formed by the range from 2 ...
[Question] [ Totally not inspired by [Visualize long division with ASCII art](https://codegolf.stackexchange.com/questions/1624/visualize-long-division-with-ascii-art) ;) Your job is to show long hand addition with ASCII art. You solve longhand addition by adding up the columns right to left, placing the value of t...
[Question] [ I have been recently told to read an entire physics textbook by the new year (true story, unfortunately). I need your help to determine what chapters I should read each day. This is where you come in. ## Input * Two dates, in any format. The second date will always be later than the first. * A list of ...
[Question] [ # Spherical excess of a triangle As we all know, the sum of angles of any planar triangle is equal to 180 degrees. However, for a spherical triangle, the sum of angles is always **greater** than 180 degrees. The difference between the sum of the spherical triangle angles and 180 degrees is called **sph...
[Question] [ A linear [Diophantine equation](https://en.wikipedia.org/wiki/Diophantine_equation) in two variables is an equation of the form **ax + by = c**, where **a**, **b** and **c** are constant integers and **x** and **y** are integer variables. For many naturally occurring Diophantine equations, **x** and **...
[Question] [ In a puzzle in an old book of mine, a game is defined in which two players choose sequences of coin flips that they believe will appear first when a coin is repeatedly flipped. (It was actually odd and even dice rolls, but this little detail doesn't matter in terms of problem equivalence.) It is noted ...
[Question] [ [Pi](http://en.wikipedia.org/wiki/Pi) is an [irrational number](http://en.wikipedia.org/wiki/Irrational_number), which means that its decimal representation never terminates or repeats itself. Pi truncated to 41 decimal digits (40 places) is `3.1415926535897932384626433832795028841971`. If we ignore th...