text
stringlengths
180
608k
[Question] [ ### Introduction You must create a function to convert Arabic numerals into Greek numerals. The input will be an integer less than `1000` and more than `0`. ### Algorithm 1. Split number into digits (e.g. `123` -> `1`, `2`, `3`) 2. Take each digit, and change to character found in table below, for l...
[Question] [ Every day, every minute, ... every microsecond, many decisions are made by your computer. In high-level languages, these typically take the form of statements like `if`, `while` and `for`, but at the most basic level there exist machine language instructions called [branch/jump instructions](https://...
[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 que...
[Question] [ What general tips do you have for golfing code in Pascal? I know this is a tricky language very few people use this but I would like to know any tips from the professionals out there :) I'm looking for tips that can reduce code size (every byte counts!) with special functions or even crazy combinatio...
[Question] [ ## Background It was a normal presentation that I were in as a audience, until the presenter gave a math problem about repeat taking 2 number out of a list a replacing them with average, claiming that there will be something special about it, and our math teacher, sitting at the end of classroom, exc...
[Question] [ Your Challenge is to take a binary string as input and get all binary numbers between itself and the reverse of its string representation (the reverse may be less than or greater than the original input). Output must be padded with zeroes to be the same length as the input. The Order in which the val...
[Question] [ Inspired by this stack of little statues that are currently on my desk at work, given to me by my colleagues from Sri Lanka when they visited The Netherlands: [![enter image description here](https://i.stack.imgur.com/sPZYQm.jpg)](https://i.stack.imgur.com/sPZYQm.jpg) This is split into two different...
[Question] [ Given input `n`, produce a word grid of size `n`, in as few bytes as possible. ## Details The number provided will always be odd. The centre square of the grid must always be empty (a space character). The letters that fill the grid must be chosen at random from the [English Scrabble letter distribut...
[Question] [ # Background You're an attractive code golfer and quite a few people are asking you out. You don't have time to think about which days exactly you're available, so you decide to create a function the accepts a date and returns the days of that week. You then take those days of the week, insert it int...
[Question] [ Given a string to encode, and a number of columns (the key), encode the string as follows: I will be using the example `Hello, world!` and the key `3` First, write out the number of columns: ``` 1 2 3 ``` Next, write the text starting from the upper left, one character per column, and when you run ou...
[Question] [ **Overview** The ancient Romans devised a number system using Latin letters, which served them well, and which is still used by modern civilization, though to a much smaller degree. In the time of its use, Romans would have had to learn to use and manipulate these numbers in order to be of much use...
[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 9 years ago. [Improve this que...
[Question] [ [TailwindCSS](https://tailwindcss.com) is a utility that lets one write CSS code using only HTML classes, which are then converted to CSS code with the Tailwind compiler. Ordinarily, one would write CSS in a separate file from the HTML, and reference named classes: ``` <!-- without Tailwind --> <p cl...
[Question] [ Write a function that takes an ASCII-printable-only (all charcodes ∈ [32..126]) string input `x` and provides an ASCII-printable-only output string `f(x)`, such that for every x * `f(f(x))=x` * `f(x)` is all-numeric (all charcodes ∈ [48..57]) iff `x` is not all-numeric You can assume input is not emp...
[Question] [ Let's have string multiplication to take a string and a positive number and concatenate that string that many times. In Haskell: ``` 0 * s = "" n * s = s ++ ((n - 1) * s) ``` Your task is to write a program that outputs a number \$n > 0\$. When you double your program (with the described procedure) t...
[Question] [ Write a program or function to produce the following output in the correct order. **EDIT:** The symbols are not mathematical! The numbers just represent unique data and the `+` and `-` could be any two arbitrary symbols. Take an non-negative integer input n. The first line is always `-`, even for n=0...
[Question] [ Based on this [challenge](https://codegolf.stackexchange.com/questions/123685/covfefify-a-string), you must determine if a string is covfefey, that is, could it have been produced as output from a covfefifier? The string will be composed of only alphabet chars (`^[a-z]\*$`, `^[A-Z]\*$` are possible s...
[Question] [ The [**continued fraction**](https://en.wikipedia.org/wiki/Continued_fraction) of a number `n` is a fraction of the following form: ![](https://upload.wikimedia.org/wikipedia/en/math/1/1/d/11dc14afeeb64dad18b916638aa287d7.png) which converges to `n`. The sequence `a` in a continued fraction is...
[Question] [ You are to make a program that can check the syntax of programs of its same language. For example, if you do it in python, it checks python syntax. Your program will receive a program on standard input, and verify whether or not its syntax is correct. If it is correct, output just "true" on standard ...
[Question] [ Write the shortest function that takes a two-dimensional square array representing the scores of a chess round, and outputs an array of the Neustadtl scores of the players. The two-dimensional array is structured so that `array[i][j]` is the score earned by the player i against player j. The Neustadt...
[Question] [ The [Feynman Challenge Cipher #1](http://www.ciphermysteries.com/feynman-ciphers) is as follows: ``` MEOTAIHSIBRTEWDGLGKNLANEAINOEEPEYST NPEUOOEHRONLTIROSDHEOTNPHGAAETOHSZO TTENTKEPADLYPHEODOWCFORRRNLCUEEEEOP GMRLHNNDFTOENEALKEHHEATTHNMESCNSHIR AETDAHLHEMTETRFSWEDOEOENEGFHETAEDGH RLNNGOAAEOCMTURRSLTD...
[Question] [ You are given a list of `(x,y)` grid coordinates. Your function should decide whether the figure obtained by coloring in the squares of the grid with the given coordinates is connected or not. Squares adjacent diagonally are not considered connected. Example input: ``` (0,0),(1,0),(2,0),(3,0),(3,1),(...
[Question] [ Consider the following binary matrix: $$\begin{matrix} 1 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 1 \end{matrix}$$ The (1-indexed) co-ordinates of the \$1\$s here are \$(1,1), (1,3), (2,1), (3, 2), (3, 3)\$. We can also notice that there are three "shapes" of \$1\$s in the matrix, made of orthogonally connect...
[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/208906/edit). Closed 3 years ago. The community reviewed whether to reopen ...
[Question] [ **This question already has answers here**: [Creating a HQ9+ interpreter](/questions/12956/creating-a-hq9-interpreter) (18 answers) Closed 7 years ago. Your task is "simple" should you choose to accept it. Write an HQ9+ compiler in a language of your choice. HQ9+ has four commands (as you may...
[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/41417/edit). Closed 1 year ago. [Improve this question](/posts/41417/edit) ...
[Question] [ Consider the digits of any integral base above one, listed in order. Subdivide them exactly in half repeatedly until every chunk of digits has odd length: ``` Base Digits Subdivided Digit Chunks 2 01 0 1 3 012 012 4 0123 ...
[Question] [ # Hash Un-hashing The basic goal of this challenge is to exploit the high probability of collision in the *Java Hash* function to create a list of plausible inputs that created an outputted hash. The program that can print the most results in one hour wins. For example, hashing `golf` produces the nu...
[Question] [ # Winner: [Ian D. Scott's answer](https://codegolf.stackexchange.com/a/35655/10961), by one byte (48 bytes)! Superb! Your program must accept input from a fraction that can be simplified, then simplify it. Rules: * If the fraction is already in its most simplified form, you must inform the user * No ...
[Question] [ You must take input in the form of ``` title|line1|line2|(...)|line[n] ``` And output an information card. It's hard to explain how to make the card, so here's a quick example: Input ``` 1234567890|12345|1234567890123|pie|potato|unicorn ``` Output ``` /===============\ | 1234567890 | |============...
[Question] [ Given a floating point `x` (`x<100`), return [`e^x`](http://en.wikipedia.org/wiki/Exponential_function) and [`ln(x)`](http://en.wikipedia.org/wiki/Natural_logarithm). The first 6 decimal places of the number have to be right, but any others after do not have to be correct. You cannot have any "magic"...
[Question] [ Select any word from [https://websites.umich.edu/~jlawler/wordlist](https://websites.umich.edu/%7Ejlawler/wordlist) with length greater than 1. For each letter on that word, remove it and check if any rearrangement of the remaining letters is present in the wordlist. If it is, this rearrangement is a...
[Question] [ This is the robbers' thread. See the cops' thread [here](https://codegolf.stackexchange.com/questions/264047/magic-oeis-formulae-cops-thread). In this cops and robbers challenge, the cops will be tasked with writing an algorithm that computes some function of their choice, while the robbers will try ...
[Question] [ # Challenge Make a triangle of numbers like below. # How to? Let say we get a numbers in the form of ab, for example `12`. We then create a triangle like below: [![Sorry for bad drawing!](https://i.stack.imgur.com/tLjh7.png)](https://i.stack.imgur.com/tLjh7.png) Sorry for my bad drawing! First we hav...
[Question] [ ## Input A string S of length between 10 and 16 inclusive. The characters are taken from the 95 printable ASCII characters, byte values `32` (`0x20`) to `126` (`0x7E`) ( to `~`) ## Output Your code must compute and output all strings within [Levenshtein](https://en.wikipedia.org/wiki/Levenshtein_dist...
[Question] [ Partially inspired by [this](https://web.archive.org/web/*/https://codegolf.stackexchange.com/questions/204147/solution-to-google-kids-code) question. ## Overview The execution of Goggle kids Code starts with an empty binary tape with 100 items, with the pointer starting at the index 0: ``` 00000... ...
[Question] [ In this challenge, your task is to input a rectangle ASCII pattern (You may assume only printable characters need to be handled, and you may assume a trailing newline or not), C4\_4 symmetrify, and output it. Here, C4\_4 symmetric means symmetric under 90-degree rotation around a corner of the corner...
[Question] [ # Introduction Output all the numbers in specific base that would appear in an adapted version of the game of seven. # Challenge Your task is to output all the numbers in a given base in a given range, skipping the ones matching certain conditions. You will be given four inputs: `base` `elim` `start`...
[Question] [ # Introduction - What is a necklace? A necklace is something that OEIS people are obsessed with. The OEIS challenge has like 5 necklace sequences. A binary necklace of length `n` is a loop with `n` beads that are either `0` or `1`. Two necklaces are the same if one can be rotated to become the other,...
[Question] [ One problem on a website like this is that you often don't know if you are talking to a male or female. However, you have come up with a simple NLP technique you can use to determine the gender of the writer of a piece of text. # Theory About 38.1% of letters used in English are vowels **[a,e,i,o,u]*...
[Question] [ There exists a brain game called [Enumerate](https://zachgates7.github.io/enumerate/) (which I made, based on [Takuzu](https://en.wikipedia.org/wiki/Takuzu)). Your challenge is to play this game. --- # Task Solve a game of 4x4 Enumerate/Takuzu. * Receive a starting grid via STDIN or command line. * O...
[Question] [ ## Background (F#) Let there be trees: ``` type Tree<'T> = Node of 'T * Tree<'T> list ``` Now lets fold them nicely with a function called... ``` foldTree f:('a -> 'b -> 'c) -> g:('c -> 'b -> 'b) -> a:'b -> t:Tree<'a> -> 'c ``` ...taking two functions `f` and `g`, an initial state `a` and of course a...
[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/7056/edit). Closed 7 years ago. [Improve this question](/posts/7056/edit) ...
[Question] [ # Background (feel free to skip) Ordinals are the abstract representation of well-orders. A well-order of a set is a total order, which basically means that every element in the set can be compared against any other element in the set, and one of them is either smaller or larger. Also there are no cy...
[Question] [ The Mathematica SE question [Creating the Yin Yang symbol with minimal code](https://mathematica.stackexchange.com/q/246309/47301) seems to be an out-of-the-box ready-to-go Code Golf SE question! > > The following code creates the Yin Yang symbol > > > ``` Graphics[{Black, Circle[{0, 0}, 1], Whit...
[Question] [ # Introduction Given an undirected graph G, we can construct a graph L(G) (called the line graph or conjugate graph) that represents the connections between edges in G. This is done by creating a new vertex in L(G) for every edge in G and connecting these vertices if the edges they represent have a v...
[Question] [ # Story I need to remember a lot of passwords and don't want to use the same one for multiple websites so I came up with a rule, but the rule shouldn't be transparent so what I do is: * Think of a long word or concept such as `breadpudding`. * Replace the first letter with the site we are logging int...
[Question] [ [Read this if you're confused.](https://www.google.com/search?q=8675309&oq=8675309&aqs=chrome..69i57j5.2943j0j7&sourceid=chrome&ie=UTF-8) # Challenge: The goal of this code-golf is based around the number `8675309`... Your goal is to print out every prime number from 2 to 8675309, *starting with the ...
[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/100852/edit). Closed 7 years ago. [Improve this question](/posts/100852/edi...
[Question] [ According to [this page](http://www.datagenetics.com/blog/april12012/index.html), the best strategy to guess English hangman words is to calculate the odds of each letter in a word list that meet our conditions. But, as I'm really lazy, I don't really want to compute every word in the dictionary by m...
[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/12693/edit). Closed 7 years ago. [Improve this question](/posts/12693/edit)...
[Question] [ **Problem** You are given a sequence of coloured balls (red `R` and green `G`). One such possible sequence is: ``` RGGGRRGGRGRRRGGGRGRRRG ``` In as few moves as possible, you must make it so that each ball is a different colour to its neighbours (i.e. the sequence alternates.) ``` RGRGRGRGRGRGRGRGRGR...
[Question] [ A rigid transformation of a square array is a mapping from square arrays of a certain size to square arrays of the same size, which rearranges the elements of the array such that the distance to each other element remains the same. If you printed out the matrix on a sheet of paper these are the trans...
[Question] [ Note: This is an attempt at recycling [guest271314's permutation question(s)](https://codegolf.stackexchange.com/q/175677/76162) There's an interesting pattern that forms when you find the differences between lexographically sorted permutations of base 10 numbers with ascending unique digits. For exa...
[Question] [ **Requirement:** Write a program (in any language) that counts the number of lines of code in files matching `*.sh` in the directory tree starting from the directory that the program is executed in, excluding lines that are empty, only contain whitespace, or are just single-line comments (a line whic...
[Question] [ ### Introduction You must create a function to convert Greek numerals into Arabic numerals. The input will be a Greek numeral less than `1000` and more than `0`. This is the reverse of my [previous challenge](https://codegolf.stackexchange.com/questions/78222/greek-conversion-golf). ### Algorithm 1. ...
[Question] [ Shrink each word in a string of group of strings to single letters delineated by spaces or punctuation. ### Example ``` I'm a little teapot, short and stout. Here is my handle, here is my spout. When I get all steamed up - hear me shout! Tip me over and pour me out. ``` becomes ``` I' a l t, s a ...
[Question] [ The goal is to write a function or program which takes a set of integer arrays and returns a set of all possible arrays which meet the following criteria: * A valid array must contain at least one number from each of the input arrays. * A valid array cannot contain more than one number from a single ...
[Question] [ The challenge is to, given a list of points, sort in a way that, when they are connected in this order, they never intersect. Input format (read from stdin): ``` X Y 1 2 3 4 5 6 ... ``` Output should be the same as input, but sorted. Rules: * You can start from any point. * The last point must be sam...
[Question] [ Inspired by the following XKCD comic: ![enter image description here](https://i.stack.imgur.com/cntL5.png) In Missy Elliot's "Work It", part of the chorus goes as follows: `Is it worth it, let me work it` `I put my thing down, flip it and reverse it` Bearing that in mind, I propose the following code...
[Question] [ Given a series of numbers for events X and Y, calculate Pearson's correlation coefficient. The probability of each event is equal, so expected values can be calculated by simply summing each series and dividing by the number of trials. ## Input ``` 1 6.86 2 5.92 3 6.08 4 8.34 5 8.7 6 8.16...
[Question] [ *This challenge was originally [posted on codidact](https://codegolf.codidact.com/posts/288943).* --- Given a number \$n \geq 3\$ as input output the smallest number \$k\$ such that the modular residues of \$k\$ by the first \$n\$ primes is exactly \$\{-1,0,1\}\$. That is, there are three primes in t...
[Question] [ **This question already has answers here**: [Biggest Irreducible Hello World](/questions/196824/biggest-irreducible-hello-world) (19 answers) Closed 3 years ago. I guess you could call this the next challenge in the "Irreducible series". * [Hello World](https://codegolf.stackexchange.com/quest...
[Question] [ According to Alexa rankings, the top 10 websites are: ``` google.com youtube.com facebook.com baidu.com yahoo.com wikipedia.org amazon.com twitter.com qq.com google.co.in ``` Being the top 10 visited websites, these are probably also the top 10 misspelled websites [Citation Needed]. # Your task Your ...
[Question] [ Given an integer `N`, output the `N`th positive number `K` with the following property in decimal base: For each digit `I` at position `P` of `K`, the number formed from `K` by removing the `P`th digit (i.e. `I`) is divisible by `I`. ### Example and remarks `324` is such a number: * `3` divides `24` ...
[Question] [ Let's get right in to it. Your challenge is to make a program that does these things depending on its input: 1. If the input is a number, output "Prime" if the number is a prime number and "Not prime" if the number isn't a prime number. You can assume the number is > 1. 2. If the input is two numbers...
[Question] [ ## Input The name of a file in the raster graphics format of your choice. The chosen format must support at least 8 bits per channel and 3 channels. ## Output A file in the same format, with the same dimensions and pixels as the first, but whose pixels are grouped in descending order of the number of...
[Question] [ **Input:** you are given 2 integers, `n` and `k`. `n` is a positive (>= 1) integer, and `k` an integer, which is the number of times you are allowed to use `n`. **Output:** output all of the non-negative integers that can be formed using at most `k` `n`'s using these mathematical operations: `+`, `-...
[Question] [ # Challenge I'm sure you read the title, and came in to farm your rep, thinking its kids' stuff, but think again! You have to challenge each other in the *shortest* code to count the occurences of a string in another. For example, given the following input: > > aaaabbbbsssffhd > > > as a string,...
[Question] [ Let us call a prime \$p\$ an \$(m,k)\$-distant prime \$(m \ge 0, k \ge 1, m,k \in\mathbb{Z})\$ if there exists a power of \$k\$, say \$k^x (x \ge 0, x \in\mathbb{Z})\$, such that \$|k^x-p| = m. \$ For example, \$23\$ is a \$(9,2)\$-distant prime as \$|2^5 - 23| = 9\$. In other words, any prime which ...
[Question] [ **This question already has answers here**: [I double the source, you double the output!](/questions/132558/i-double-the-source-you-double-the-output) (162 answers) Closed 6 years ago. Related: [I double the source, you double the output!](/q/132558/71806) --- When *Steve Jobs* launched the iP...
[Question] [ Write a program or function that given a string (or your language's equivalent), determine if the string is a word, or not, and output a truthy or falsy value. *(This is not a duplicate of [Is this even a word?](https://codegolf.stackexchange.com/questions/45295/is-this-even-a-word) The incorrect wor...
[Question] [ Instead of normal binary, you must count from 1 to an input in **negabinary concatenated to negaquaternary**. Here's an example, put in the form of an array: ``` [11, 1102, 1113, 100130, 101131, 11010132, 11011133, 11000120, 11001121, 11110122, 11111123, 11100110, 11101111, 10010112, 10011113, 100001...
[Question] [ Write a program (the body of the function is enough) that accepts a string of alphanumeric characters and validates it according to ISO 13616:2007. The algorithm for validation is (source: wikipedia article on IBAN <http://en.wikipedia.org/wiki/International_Bank_Account_Number>): > > Validating the...
[Question] [ Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output. ``` Input 1x+1y=1 1x-1y=1 Output (1.00,0.00) Input 0x+1y=0 1x+0y=0 Output (0.00,0.00) ``` 1. -1000000 <= A,B,...
[Question] [ *This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge, the cops' thread is [here](https://codegolf.stackexchange.com/questions/241485/from-code-to-golf-cops-thread)* You can change the word `code` into `golf` by changing a letter at a t...
[Question] [ In this challenge, the task is to write a program or function which simulates a number of people walking. Input will be some representation of the people's positions on a 2d grid, and one of four directions (or none) for each. The movement follows a few rules: * No person can walk into a space occupi...
[Question] [ I can see that it is 101 'moving to the right' but I cannot think of a short way to generate it in R language. \$\begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix}\$ ...
[Question] [ # Context: Gynvael Coldwind, a famous security researcher, published a contest [in his blog post](https://gynvael.coldwind.pl/?lang=pl&id=710) (that is now complete). The goal was similar to the one described here, but with certain restrictions depending on which of the three allowed programming lang...
[Question] [ This challenge is inspired by a board game I played some time ago. The story of this challenge doesn't necessarily have to be read, the **goal of the challenge**-section should explain everything necessary. ## The Story *People are locked inside a large room with a human-devouring monster. The wall...
[Question] [ ## Specifications Your program must can take in an integer `n`, then take in `n` more strings (containing only alphanumeric characters) in your preferred method (separated by whitespace, file input, hash table etc.). You must then find the permutation before the inputted strings when sorted in lexico...
[Question] [ # The Challenge Given an integer, calculate its score as described below. The score is calculated by raising each digit of the input Integer to the power `n`, where `n` denotes the index of the digit in Input (beginning with 1) when counted from left to right (the index of leftmost digit should be 1)...
[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/68636/edit). Closed 8 years ago. [Improve this question](...
[Question] [ What is the shortest C# statement that will convert a string representation of a number to an `int[]` that contains each digit? ``` string number = "1234"; number.Array.ConvertAll(line.ToCharArray(), c => Int32.Parse(c.ToString())); number.ToCharArray().Select(i => Convert.ToInt32(i.ToString())).ToAr...
[Question] [ **This is the companion thread to the main [Recover the mutated source code (link)](https://codegolf.stackexchange.com/q/42910/3808) challenge.** If you have successfully cracked a cop's answer, post your solution as an answer to this question. As a reminder, here are the robber rules from the main c...
[Question] [ Write a program that outputs Lewis Carroll's poem [The Mouse's Tale](http://en.wikipedia.org/wiki/The_Mouse's_Tale) from Alice in Wonderland, drawn in its distinctive tail-like shape. [![The Mouse's Tale](https://i.stack.imgur.com/fVCJW.jpg)](http://www.lewiscarroll.org/2013/05/31/alice-discovers-con...
[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/6674/edit). Closed 9 years ago. [Improve this question](/posts/6674/edit) ...
[Question] [ Johnny is trying to create crossword puzzles, but he is having difficulty making words match each other. He has come up with several simple word rectangles: that is, groups of words that form a rectangle where all horizontal and vertical paths form a word. ``` //2x2 PA AM //2x3 GOB ORE //3x3 BAG AG...
[Question] [ # Background The monkeys need your help again organizing their defense and have asked you, [Benjamin](https://bloons.fandom.com/wiki/Benjamin_(BTD6)) the code monkey, to create a program that will list all tower upgrade options as they appear in your insta-monkey collection. Each tower has three uniq...
[Question] [ Given an input integer from 1, 2, ..., n, the task to write code to make a number as close as possible (as measured by absolute distance) to `e` using only the four mathematical operations +, -, \*, / and parentheses (brackets). You can use any of the integers up to `n` once but don't have to use all...
[Question] [ Given a set of intervals \$\mathcal{I} = \{I\_1, \ldots, I\_m\}\$, where each interval \$I\_j\$ is represented by its bounds \$(a\_j, b\_j)\$, find a partition \$\mathcal{T}\$ of \$\mathcal{I}\$ of minimal cardinality such that for each set \$T\_i \in \mathcal{T}\$ it holds \$\bigcap T\_i \ne \emptys...
[Question] [ I want to read two strings on separate lines, each string the same length and containing only 0's and 1's, and determine if the first is the one's complement of the second. How succinctly can this be done in Python3? (Sorry to specify the language, but this is for my son who's studying Python) A list...
[Question] [ ## Intro Imagine a list of elements and their outcomes when some non-commutative function is applied to them. For example, we will use the elements `Rock`, `Paper`, and `Scissors`, the outcomes `Win`, `Lose`, and `Tie`, and an operator `*` such that `X*Y` = what would happen if you played `X` against...
[Question] [ # Objective Given a **positive** integer, spell it out in the conlang I made. # Specification Let \$n\$ be the inputted integer. \$n\$ shall be spelled out in the following specification. **The entire spelling is case sensitive.** With the decimal expansion of \$n\$, let **d** be the least significan...
[Question] [ In this challenge, the goal is to create a pristine [truth machine](https://esolangs.org/wiki/Truth-machine) in as few bytes as possible. For reference, a truth machine does the following: * Takes input, which is always 0 or 1 * If the input is 0, it is printed and the program terminates * If the inp...
[Question] [ I've invented an SQL-like language. Let's call it SelectQL. You can't `INSERT` anything, you can only `SELECT`, and I don't have the time for an interpreter. How about you help? # The Challenge Write a full program or a function that takes in a database of tables and a valid SelectQL `SELECT` string,...
[Question] [ [The Mel calendar](http://conlinguistics.org/arka/e_data_palt_1.html) is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar. This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, ...
[Question] [ ## Challenge: In the language of your choice, write a program that generates a leaderboard with random scores and outputs it, then take a new score as input and check if it can be placed in the leaderboard, and output which place it is in. ## Specifications: * You must **generate a list of 50 "random...
[Question] [ Thanks [@NathanMerrill](https://codegolf.meta.stackexchange.com/users/20198/nathan-merrill) for allowing me to post this! The following is entirely his wording from [this sandbox post](https://codegolf.meta.stackexchange.com/a/10794/58826) (deleted): --- We define a "Fresh" substring as a substring t...
[Question] [ Given a list of pairwise distinct integers, sort it in alternating order: The second number is larger than the first, the third is smaller than the second, the fourth is larger than the third etc. (This order is not unique.) E.g., `5 7 3 4 2 9 1` would be valid output. Extra points (since this is cod...