text
stringlengths
180
608k
[Question] [ ## The Task The task is easy: given an Alpha-2 country code, output the Alpha-3 equivalent. The input may be in any case you choose, and the output in any consistent case of your choosing. Here are the codes: ``` [["AF", "AFG"], ["AX", "ALA"], ["AL", "ALB"], ["DZ", "DZA"], ["AS", "ASM"], ["AD", "AND"],...
[Question] [ Your task is to take an array of numbers and a real number and return the value at that point in the array. Arrays start at \$\pi\$ and are counted in \$\pi\$ intervals. Thing is, we're actually going to interpolate between elements given the "index". As an example: ``` Index: 1π 2π 3π 4π 5π...
[Question] [ # Challenge Let's imagine an `N`-tuple of integers between 0 and `M` inclusive, and let's call it `F`. There are `(M + 1) ** N` possible `F`s in total. How many such `F`s satisfy all of the following inequalities (index is one-based)? * `F[n] + F[n+1] <= M` for `1 <= n < N` * `F[N] + F[1] <= M` Write a...
[Question] [ ## Overview Given the integer representation of three elements in GF(2^64), give the product of the first two elements over GF(2^64) with the reducing polynomial defined as the polynomial m such that m(x) = x^64 + n(x), where n is the polynomial representation of the third element. ## You want me to *...
[Question] [ Given an array of positive integers `A` as the input, generate a program that, when repeated for `k` times, output the `k`th(1-index) value of the array. For example, if the array is `[1,11]`, the output should be a program that outputs `1`, and when repeated twice, output `11`. Code like `print(end="1...
[Question] [ You know what a **palindrome**, a **prime** and a **date** are. > > Your task is to list all dates in 100 thousands of years that fulfill > all three characteristics. > > > Nevermind anything but the numbers, use the following formats: **YYYYMMDD** and **YYYYYMMDD**. Dates between 0000-01-01 and ...
[Question] [ This is a simple challenge which hopefully may lead to some creative answers. Quoting [Wikipedia](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling): *"Dual-tone multi-frequency signaling (DTMF) is an in-band telecommunication signaling system using the voice-frequency band over telepho...
[Question] [ In this challenge, you must parse a list of lists, into a simpler list format. This challenge is based on my sadflak parser. In my sadflak parser, it has all the () removed, replaced with the sum of the ()s at the start of the list, to make the program run faster. To parse into a Sad-List, you have to ...
[Question] [ A variable number of bits is an array of 0 or more bits. So `[0, 1]` is a variable number of bits, but so is `[]`. Write a function or program that, given an nonnegative integer returns a variable number of bits such that every integer has a one-to-one (bijective) mapping with an array. There are an in...
[Question] [ I define the following operators: **Manhattan Addition** a +M b, for single-digit numbers, is the result of concatenating b onto a. So, a +M b = 10a + b. Therefore, the general operator +M is defined as thus: ``` a +M b = 10a + b ``` **Manhattan Subtraction** a –M b, for single-digit numbers, is the re...
[Question] [ [Pi](https://en.wikipedia.org/wiki/Pi) times [e](https://en.wikipedia.org/wiki/E_(mathematical_constant)) (or Pie if you like ambiguous notation) to 100 decimal places is: ``` 8.5397342226735670654635508695465744950348885357651149618796011301792286111573308075725638697104739439... ``` ([OIES A019609](h...
[Question] [ ### Challenge Challenge is writing a program that takes a **positive** numbers `a` and a **nonzero** number `b` and outputs `a^b` (a raised to the power b). You can only use `+ - * / abs()` as mathematical functions/operators. These can only be applied to scalar values, but not to whole lists or arrays...
[Question] [ The challenge is to generate an ASCII character count ruler in the following format: ``` +-------------------------------------------------------------------------+ || | | | | | | | | | | | | | | | |0 10 20 30 40 50 6...
[Question] [ [Stevin's Notation](https://en.wikipedia.org/wiki/De_Thiende) is a way to represent decimals in a non-fractional way. > > The Flemish mathematician and engineer Simon Stevin is > remembered for his study of decimal fractions. Although he was not the > first to use decimal fractions (they are found in ...
[Question] [ Given a list of fractions, group them so that each group sums to a whole number. This should be done in such a way to maximize the number of non-empty groups. You may assume a solution exists. Order does not matter, both for the groups and their contents. You may output in any order. ## Test Cases | Fr...
[Question] [ Given two sets of strings, \$ D \$ and \$ R \$, find the shortest string which contains every string in \$ D \$, but contains none of the strings in \$ R \$. There are almost always multiple possible outputs; you should output at least one of them, but you can output more. You can assume this is possib...
[Question] [ Starting at 1-TET, give equal temperaments that have better and better approximation of the perfect fifth(just ratio 3/2). ([OEIS sequence A060528](https://oeis.org/A060528)) The formal description of the sequence, copied from the OEIS: > > A list of equal temperaments (equal divisions of the octave) ...
[Question] [ ## Introduction: In the **northern hemisphere** (i.e. Europe, North America, etc.), the seasons are divided like this: - **Spring:** March, April, May - **Summer:** June, July, August - **Autumn:** September, October, November - **Winter:** December, January, February In the **southern hemisphe...
[Question] [ Write a program that, when run in different languages, outputs a different byte permutation of the code in each language. The exact source code is counted as one permutation. Here "different language" can be different version(Py 2 and Py 3) or different standard flags. It's different output that forces...
[Question] [ # Introduction Given five points in the plane, your task is to compute the area of the ellipse passing through these points. You can assume that exactly one non-degenerate ellipse can be constructed with the given input values. # Rules Input is `10` integers in any convenient form, corresponding to the...
[Question] [ The N-bonacci sequence, originally invented by @DJMcMayhem in [this question](https://codegolf.stackexchange.com/q/70476/61613), is a sequence generated by starting with the integers 0 and 1, and then adding the previous N numbers to generate the next number. The special N-bonacci sequence is an N-bona...
[Question] [ # Challenge Given a valid `goo.gl` shortened link, output the original URL. # Example `goo.gl/qIwi3N` would give something like `https://codegolf.stackexchange.com/`. For input, you can choose to have the `https?://` at the beginning, you can choose to have `www.` before the `goo.gl`, and you can also ...
[Question] [ [K-means](https://en.wikipedia.org/wiki/K-means_clustering) is a standard unsupervised clustering algorithm, which, given a set of "points" and a number of clusters K, will assign each "point" to one of K clusters. ### Pseudo-Code of K-means Note that there are many variants of K-means. You have to imp...
[Question] [ You should complete four tasks in a language which: * must return no results\* when searched for on this (codegolf.se) website, for example [ToffeeScript](https://codegolf.stackexchange.com/search?q=toffeescript); * must have a page listed at [Esolang](https://esolangs.org/wiki/Language_list), [Rosetta...
[Question] [ My coworker and I work on a legacy piece of software that we hate sometimes. Whenever you run it, debug asserts come flying everywhere, and it's never a guarantee that anything will work. The motivation for this round of code golf came from my coworker saying **the following about our software**. *"It'...
[Question] [ ## Explanation Two strings can be shuffled by interspersing their letters to form a new string, much like two piles of cards can be shuffled to form a single pile. For example, the strings `HELLO` and `WORLD` can be shuffled to form `HWEOLRLLOD`, or `HEWORLLLDO`, or perhaps simply `HELLOWORLD`. It is ...
[Question] [ *[There was a previous perceptron question but it was closed](https://codegolf.stackexchange.com/questions/171296/single-perceptron-implementation). Also it required a lot of extra stuff that's not normally part of the perception algorithm like I know it. This question will be much simpler* The [Percep...
[Question] [ Inspired by [this](https://codegolf.stackexchange.com/questions/237085/swap-every-two-elements-in-a-list) question. ## Challenge Let `L` be a list of `n` distinct elements. Let `P` be the set of all (unordered) pairs of positions in P. Let `R` be a result of applying a pair-swap operation on `L` by eve...
[Question] [ In this challenge you will write a piece of text which when viewed from two different angles will create two different programs. Your string as viewed from above must take a string containing only characters ASCII 10, 32 - 126 and output it as viewed from above. Additionally your program when viewed fr...
[Question] [ I'm trying to get the shortest way (character possible) to obtain List 3. List 1 and List 2 are already given to me as arguments and are the same length. ``` l1 = [1, 2, 3, 4, 5] l2 = ['a', 'b', 'c', 'd', 'e'] ``` And List 3 should look like (yes, it needs to be a list): ``` l3 = ['a', 1, 'b', 2, 'c', ...
[Question] [ # Challenge: In a hypothetical scenario, the countdown timer for a race has *random intervals* between the counts, to prevent premature starting, e.g. ``` 3 (0.82 seconds pass), 2 (0.67 seconds pass), 1 ``` --- # Input: nothing --- # Output: Write a program (or function) that prints the 3 numbers with...
[Question] [ Make a quine but with a twist. **Statement** The quine prints its code but puts its first character at the end. (You can do it in reverse but include that note in your answer) The output must then be a program which is also an solution. Example: Assume your code was `foobar`, running it will return...
[Question] [ ### The Challenge I am thirsty and need a drink, but I don't know what to order. Your task is to provide me with either a drink or options for one. ### I/O Input will be either a *base* or a *drink name*. If given a *base*, your program should output *one random* drink from a list of drinks with that b...
[Question] [ Sandbox post [here](http://meta.codegolf.stackexchange.com/a/10889/62574). Create a function or program that "Springifies" a string. * Input will be a String in Stdin, or closest alternative * Input will only contain printable ASCII and/or spaces * Output will be to Stdout, or closest alternative * A t...
[Question] [ [Adam7](https://en.wikipedia.org/wiki/Adam7_algorithm) is an interlacing algorithm for raster images, such as PNG. It is called the "Adam7" algorithm because it was invented by Adam M. Costello, and it is generated by following a certain pattern 7 times. One of the cool things about the Adam7 algorithm...
[Question] [ Given an input of two strings with sequences of underscores representing corresponding words, output the sentences with the "blanks" filled in. The best way to describe this challenge is by example. Here is an example input: ``` programming _____________ and code golf programming puzzles ______ code __...
[Question] [ *EDIT:* As some of you suspected, there was a bug in the official interpreter: the order of composition in `.` was reversed. I had two versions of the interpreter, and used the wrong one here. The examples were also written for this incorrect version. I have fixed the interpreter in the repository, and...
[Question] [ Terminals are so *boring* these days. They used to look like this: [![Terminal 1](https://i.stack.imgur.com/89f5kt.jpg)](https://i.stack.imgur.com/89f5k.jpg) [![Terminal 2](https://i.stack.imgur.com/yNfEbt.jpg)](https://i.stack.imgur.com/yNfEb.jpg) Now they're just bland and dull and black-and-white. I...
[Question] [ Given that the Chinese New Year is coming, here is a challenge to calculate the Chinese Zodiac, element and Taijitu for a given date. The input should be a date: ``` 1/31/2014 ``` The date used here is the US style `mm/dd/yyyy`, but may alternatively be ISO-8601 style: `yyyy-mm-dd` so the style of date...
[Question] [ Find the shortest regex that matches all radioactive elements and nothing else in the Periodic Table of Elements. Radioactive Elements ``` 'Technetium','Promethium','Polonium','Astatine','Radon','Francium','Radium','Actinium','Thorium','Protactinium','Uranium','Neptunium','Plutonium','Americium','Curiu...
[Question] [ [Shamir's secret sharing scheme](http://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing) is a simple way of protecting a secret by splitting it into several parts needed to reconstruct it. Your task is to implement Shamir's Secret Sharing reconstruction over the [Finite Field](http://en.wikipedia.org/w...
[Question] [ [Knight](https://github.com/knight-lang/knight-lang) is the [Language of the Month for August 2022](https://codegolf.meta.stackexchange.com/questions/25002/language-of-the-month-for-august-2022-knight), and I noticed that it didn't have a [tips](/questions/tagged/tips "show questions tagged 'tips'") pa...
[Question] [ Given a list of activities and their start time/date, output an ASCII-art calendar showing the activities on the appropriate days. All activities are guaranteed to be in the same month, no two activities will be on the same day, and all activities are guaranteed to fit within the calendar box. The cale...
[Question] [ It is the year MDLXVII in a world in which the Roman Empire never fell, and the collapse into the dark ages never occurred. Due to the extended period of Pax Romana, the empire's economic stability enabled technology to progress at a rapid rate. The Romans have begun to dabble with circuitry, and have...
[Question] [ Spring has recently arrived, and it is almost the time when flowers start to sprout. So I want you to help them grow. **Your task:** Given two numbers, `m`, and `n`, output `m` flowers randomly placed on an `n*n` grid. A single flower looks like this: ``` & | ``` A flower's position is defined by where...
[Question] [ What is the smallest possible runnable [Mach-O](https://en.wikipedia.org/wiki/Mach-O) executable on x86\_64? The program can do nothing (not even returning a return code), but must be a valid executable (must run without errors). My try: GNU Assembler (`null.s`): ``` .text .globl _main _main: retq ...
[Question] [ [![enter image description here](https://i.stack.imgur.com/V9ZFc.png)](https://i.stack.imgur.com/V9ZFc.png) Found this picture on the web today. Being a lazy programmer, I don't want to actually open google and type a couple of characters. Way too much work! This is such an important task that it shoul...
[Question] [ Cribbage is an interesting game, because you need a specific board to score your game. A cribbage board looks like this: [![enter image description here](https://i.stack.imgur.com/tfwSC.jpg)](https://i.stack.imgur.com/tfwSC.jpg) Notice how the first column is on the left as it goes up, then on the righ...
[Question] [ There's [classic combinatorial result](http://www.cut-the-knot.org/arithmetic/combinatorics/FibonacciTilings.shtml) that the number of ways to tile a `2*n` strip by `1*2` dominoes is the nth Fibonacci number. You goal is to print all the tilings for a given `n`, drawn with dashes and vertical lines lik...
[Question] [ # BrainFlow ## What is BrainFlow? BrainFlow is an extension of BrainF\*\*k (BFk) with 3 additional commands for added functionality and confusion. ## What commands? In addition to the normal [BFk commands](http://en.wikipedia.org/wiki/Brainfuck), we also have: > > **^** *Jumps to the cell # depending ...
[Question] [ Create a function that takes a natural number (starting from 0 inclusive), and returns a pair of positive integers, which are the numerator and denominator respectively. Use the diagonal traversal. Previous-counted numbers must be skipped. (you can memorize the set of skipped values) Diagram: ![enter i...
[Question] [ Given an \$m \times n\$ matrix of integers A, there exist a \$m \times m\$ matrix P, an \$m \times n\$ matrix D, and an \$n \times n\$ matrix Q such that: * \$A = P D Q\$. * P and Q are unimodular matrices (i.e. matrices which are invertible and whose inverses are also integer matrices); * D is diagona...
[Question] [ As the title may suggest, this problem is semi-inspired by the [Polite Near-Sighted Drunk Bot](https://codegolf.stackexchange.com/questions/170229/gold-collector-koth) by @N.P. Our poor bot is placed on a cartesian grid at the origin, and after each minute, it moves 1 unit in one of four directions (U...
[Question] [ We all know what a [quine](https://codegolf.meta.stackexchange.com/questions/4877/what-counts-as-a-proper-quine?) is. An *inverted* quine is a non-empty program that prints the inverse of its source code without reading its source code, and consists solely of printable-ASCII characters (space through `...
[Question] [ Write a quine, that when run, creates itself in the current directory, in a source file named itself. We will be using Windows in this, so the file name (and therefore quine) must have the following limitations: * None of these characters `\ / : ? * < > |` * Fewer than 211 255 characters ### Limitation...
[Question] [ ## Credit My thanks to [Rand Al'Thor's letter-based question](https://puzzling.stackexchange.com/questions/42709/a-triangle-formed-of-three-letters) for the inspiration for this code-golf challenge. ## Background The nature of this challenge is based off the algorithm mentioned by Rand in his "A Triang...
[Question] [ As of time of submission to the sandbox, I had 17017 reputation, which you will all be able to factorise as 7×11×13×17, a product of 4 consecutive primes. Please write a function or program to output all the products of two or more consecutive primes up to an input integer `n`. For example, given `n=14...
[Question] [ You're tasked with writing a program that syllabifies words in a string of text, by separating them with a hyphen. That would be a lot of work, so you want to skip some parts, mainly because you don't want to have a table of the pronunciations required for perfect algorithm. You also want to make it as...
[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/17588/edit). Closed 2 years ago. [Improve this question](/posts/17588/edit) ...
[Question] [ Given an initial \$n\$-tuple \$t\_0=(t\_{0,1},...,t\_{0,n})\$, we can obtain its corresponding [Ducci sequence](https://en.wikipedia.org/wiki/Ducci_sequence) \$\{t\_0, t\_1, ...\}\$ by the recurrence \$\displaystyle t\_{i+1}=\left(\left|t\_{i,1}-t\_{i,2}\right|,\left|t\_{i,2}-t\_{i,3}\right|,...\left|t...
[Question] [ *Inspired by [this challenge](https://puzzling.stackexchange.com/questions/90301/can-you-put-l-trominos-to-fill-the-figure) from puzzling.SE.* Polyominoes are fun - you can fill all sorts of shapes with them. But as soon as you have limits on what polyominoes you can use, you sadly start running into s...
[Question] [ I'm a big fan of number theory. A big thing in number theory is modular arithmetic; the definition being \$a\equiv b\mod m\$ if and only if \$m\mid a-b\$. A fun thing to do is raising to powers: especially when the modulus is a prime number. In particular, it has been proven that if \$a\$ and \$m\$ are...
[Question] [ *I know, I know, yet **another** primes challenge...* [Related](https://codegolf.stackexchange.com/q/94714/42963) A lonely (or isolated) prime is a prime number `p` such that `p-2`, `p+2`, `p-4`, `p+4` ... `p-2k`, `p+2k` for some `k` are all composite. We call such a prime a **`k`th-times-isolated prim...
[Question] [ *Clarification: Basically, you need to make [this](https://www.khanacademy.org/computing/computer-science/cryptography/modern-crypt/p/euler-totient-exploration)* Euler's totient function has the name phi. Let's try to calculate phi(8) First, list all numbers 8 and under backwards, not including 0 or un...
[Question] [ Implement a [CipherSaber](http://en.wikipedia.org/wiki/CipherSaber) encryption program, as described below. Guidelines: * The smallest entry, in bytes, wins. + However, in a departure from [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") norms, you are welcome to post inter...
[Question] [ When one performs a search query using [Google](https://www.google.com), one of the first things you see is an approximation of how many results were found. Today, you'll be simulating this in as few bytes as possible. ## Input A short string of length at most 10 with characters from a-z. ## Output The...
[Question] [ ## Summary A new string manipulation language has been made, using only the characters `$+#-!*|@>`! Your task is to implement an interpreter for it in as few bytes as possible. ## Input A string, which is a single line of this language. This can be taken in any reasonable way (stdin, function parameter...
[Question] [ Inspired by [github.com/JackToaster/Reassuring-Parable-Generator](https://github.com/JackToaster/Reassuring-Parable-Generator), in turn inspired by [xkcd.com/1263](https://xkcd.com/1263). The possible words are derived from the [reassuring.cfg](https://github.com/JackToaster/Reassuring-Parable-Generato...
[Question] [ # Task Your task is to write a program that will take input, and then output the lyrics to [We Are Number One](https://www.youtube.com/watch?v=PfYnvDL0Qcw), changing specific words. The input will contain both the words to be changed, and the replacement word. ## Input The input will be in the followin...
[Question] [ # Challenge Write a full program/function to Demolish a given building at the rate **1 floor per second**. # INPUT Input is a **building** through **STDIN**(or whatever is called in your language) or through an **ARGUMENT** of a function. **t=0 s** ``` | |#| {#} |# #| |# # #| |# # #| |# # #| ...
[Question] [ # Preface There are many "draw x flag" challenges, and upon searching it turns out there are no challenges to draw the union Jack! I feel like this would be a harder flag to draw but it should still be possible. # Challenge Draw the Union Jack. It can be outputted to a file in any freely available grap...
[Question] [ In the classic days of Starbucks before these newfangled sticker-printers and wireless drivethrough headset palmtop scanner dealies, in the heady days of 2000-ish, Starbucks had a concise system for describing beverages with a strict syntax and accompanying encoded form. Vertically on the cup there are...
[Question] [ The Gray Code is a sequence of binary numbers of bitwidth `n` where successive numbers differ only in one bit (see example output). [Reference](http://en.wikipedia.org/wiki/Gray_code) Example input: ``` 3 ``` Example output: ``` 000 001 011 010 110 111 101 100 ``` Notes: * This question seems to have a...
[Question] [ **Task:** Your task is to create a program that, when given a number of strands and number of iterations of a braid, will tell where each strand goes. Rules are as follows: * The number of strands will always be odd, and between 3 and 6000 (inclusive) * When you start, the strands will be divided into ...
[Question] [ **This question already has answers here**: [Write a polyglot that prints the language's name](/questions/7261/write-a-polyglot-that-prints-the-languages-name) (17 answers) Closed 10 years ago. Make a program which prints `just another #{LANG} hacker` where `#{LANG}` is the name of the language ...
[Question] [ Given an ascii musical score, you must be able to output the note and its corresponding length. The score will contain between 5 and 15 notes inclusive, and is transcribed on a stave. A stave is made up of five horizontal lines comprising of - (minus) characters separated by lines of spaces. The bottom...
[Question] [ Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details. --- Happy Hanukkah! A beloved Hanukkah tradition for many, the game of [Dreidel](https://e...
[Question] [ [Curry is the Language of the Month](https://codegolf.meta.stackexchange.com/questions/24640/language-of-the-month-for-april-2022-curry) this month and some users are starting to get into it, so let's get some [tips](/questions/tagged/tips "show questions tagged 'tips'") together. Haskell and Curry are...
[Question] [ You are an evil wizard, doing evil wizard business, when suddenly your crystal ball alerts you of a hero on their way to defeat you. To crush their hopes and dreams, you decide to trap the hero in a maze. You could just make a big maze but where would be the fun in that? Instead, you decide you want to...
[Question] [ > > In response to [here](https://codegolf.stackexchange.com/questions/224852/drawing-the-stack-overflow-logo#comment520524_224852). > > > Unlike [the previous one](https://codegolf.stackexchange.com/questions/4561/generate-the-stack-overflow-logo), this focuses on [code-golf](/questions/tagged/code...
[Question] [ The goal of this challenge is to extend the OEIS sequence [A334581](https://oeis.org/history/view?seq=A334581&v=5). > > Number of ways to choose \$3\$ points that form an equilateral triangle from the \$\binom{n+2}{3}\$ points in a regular tetrahedral grid of side length \$n\$. > > > The sequence b...
[Question] [ The (slightly harder, but still easy) sequel of [Generate input for this hardware](https://codegolf.stackexchange.com/q/195009/78410). ## Background I have a hardware that has a 32-bit input register. The register has the following characteristics: * The 32-bit register consists of eight 4-bit fields. ...
[Question] [ At a party, I was introduced to the game LCR. Now it's not a great game as there's no skill but only random chance. But it got me thinking, I could code this, and I made a quick program in R to model the game. Rules of the game modified from Wikipedia to match how we played: > > Each player receives ...
[Question] [ [Topically related.](https://codegolf.stackexchange.com/q/168683/31957) **Objective:** Given a matrix of positive integers \$M\$, output the smallest [centrosymmetric matrix](https://en.wikipedia.org/wiki/Centrosymmetric_matrix) which contains \$M\$ (this matrix may contain non-positive integers as wel...
[Question] [ The challenge here is to find the longest uninterruped arc around a unit circle with a random amount of points distributed in random positions around it. Here is a diagram to assist my explanation: [![example](https://i.stack.imgur.com/bScM5.png)](https://i.stack.imgur.com/bScM5.png) The red line ...
[Question] [ Most people are familiar with the trope about counting sheep to fall asleep. There's a herd of sheep, some of them jumping over a fence, and you count the sheep as they jump. Supposedly, this helps quiet your mind and gets you into a sleep-like state so that you'll fall asleep. Here's an ASCII sheep fa...
[Question] [ This task is to output the shortest path to a file, after glob expansion. What is shell globbing? In most shells, you can use the `*` character in a path to represent any characters at the position. For example, If directory `foo` contains files `bar` `baz` and `asdf`, then `foo/b*` will expand to `foo...
[Question] [ The task is simple, given two IP adresses `a` and `b`, output all addresses within that range. --- # Examples Example #1: ``` f(a = 192.168.0.1, b = 192.168.0.4) 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.4 ``` Example #2 (TIO will truncate this, use a smaller range when testing): `...
[Question] [ I have trouble remembering everything I have to do when leveling up a D&D character. For whatever reason, one of the things that gives me trouble is figuring out what their new maximum HP value should be. For this challenge, you will write a program or function to calculate the correct value automatica...
[Question] [ **Objective:** > > Code two programs where each of the programs outputs both source codes > interlaced per character like a zipper, a Double-slit Quine. The output from a Double-slit Quine > is starting with the first character from the source code of the first > program. If the source code of one ...
[Question] [ People have written many things allowing one thing to be visualized as another. Now I propose being able to translate letters to music! Its your job to write a program that takes a text file and outputs a sound file with each letter converted to a specific note from [`C3-C8`](http://en.wikipedia.org/wi...
[Question] [ [Inspired by this question](https://codegolf.stackexchange.com/questions/47895/generate-a-brainf-ck-program-that-outputs-a-string-of-given-length), your goal today is to encode an URL in brainfuck. My browser has been hacked! The location bar has been turned into a brainfuck interpreter. I need a progr...
[Question] [ Create a bidirectional Gematria calculator, for any given sequence of Unicode characters as the alphabet. # Gematri-What? [Gematria](http://en.wikipedia.org/wiki/Gematria) is a system of assigning numerical values to symbols, developed by ancient Greeks and adopted by ancient Jews. It is in a way like ...
[Question] [ An \*\*\*ameoba graph\*\*\*\* is a type of [tree](http://en.wikipedia.org/wiki/Tree_(graph_theory)) whose nodes all have values from 0 to some non-negative integer N, and any particular node with value x < N connects to x+1 *distinct* nodes with values x+1. # Ameoba graph for N = 3: (Denoted A3) ![ameo...
[Question] [ # Objective Given a date, spell it out in Romanized Japanese. # I/O Format The input format is flexible. The output format is `<month spelling> <day spelling>`; note the space. You can freely mix cases in output. You may output trailing newline. # Mapping ## Months | Month | Spelling | | --- | --- | | ...
[Question] [ This challenge is a riff on Dion's challenge "[Is this a rectangle?](https://codegolf.stackexchange.com/q/203098/53884)". The goal of this challenge is to write a program to decide whether or not some collection of tuples of integers represents a hypercube of some dimension. ### Background A [hypercube...
[Question] [ # Task Your task is to make the smallest function/program that can, when gives an number N, return/print: the number of possible choices `a, b` such that \$1 \leq a < b < N\$ and `a` and `b` have exactly one common digit in base 10 (there exists a digit, and only one digit, which appears both in `a` an...
[Question] [ Convert a hexadecimal number (of any size) into a binary number. **Input** A *POSITIVE* hexadecimal number with a `0x` in the beginning. A valid input will always match the following regex: `0x[0-9a-fA-F]+`. If the input is *not* a valid hexadecimal number, that is, anything not matching this regex,...
[Question] [ Your task is to calculate the expected chance of winning for 2 players in some game, each with their own **[ELO Rating](https://en.wikipedia.org/wiki/Elo_rating_system#Mathematical_details)**. Player A has ELO Ra and player B has ELO Rb The expected score for Player A (Ea) is: 1 / (1 + 10(Rb - Ra) / 40...
[Question] [ Lets create a system of numbers where the biggest digit in the nth place value (counting from right to left) of a number length m is always equal to m - n + 1. To give an example the largest 5 digit number expressible in this system is written 12345. Apart from the number of digits available to be used...