instruction stringlengths 34 53.1k |
|---|
The world is a five by five array of cells. It wraps on all sides. It can be visualized like...
XXXXX
XXXXX
XXOXX
XXXXX
XXXXX
You are an O. You love to travel the world, and you do so according to the following rules (let C be the current day):
On prime days, you feel nostalgic. Return to where you started yesterday... |
A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does:
Gets a number (either 0 or 1) from STDIN.
If that number is 0, print out 0 and terminate.
If that number is 1, print out 1 forever.... |
Introduction
In this challenge, you are given a list of nonnegative floating point numbers drawn independently from some probability distribution.
Your task is to infer that distribution from the numbers.
To make the challenge feasible, you only have five distributions to choose from.
U, the uniform distribution on th... |
Write a program that takes 2 strings as input, and returns the longest common prefix. This is code-golf, so the answer with the shortest amount of bytes wins.
Test Case 1:
"global" , "glossary"
"glo"
Test Case 2:
"department" , "depart"
"depart"
Test Case 3:
"glove", "dove"
""
|
Objective: Given a positive integer n:
If n is odd, output the list of n numbers closest to 0 in increasing order
If n is even, output a Falsey value.
Test cases:
5 -> [-2,-1,0,1,2]
4 -> false (or any Falsey value)
1 -> [0]
Reference implementation
function update(){
var num = +document.getElementById("yield")... |
The barbells at my gym look like this:
=========[]-----------------------[]=========
They can hold plates of five different sizes, 2.5 pounds, five pounds, ten pounds, 25 pounds, and 45 pounds:
.
. ! |
. ! | | |
| | | | |
' ! | | |
' ! |
'... |
Monday Mini-Golf: A series of short code-golf challenges, posted (hopefully!) every Monday.
Sorry it's late; I realized 90% of the way through writing out a different idea that it was a duplicate.
My family is rather large, so we eat a lot of food. We usually need to double, triple, or even quadruple recipes to make en... |
Introduction
Write a program or function that adds a drop capital to a paragraph. The program will input the text to format, the column width, and the number of lines to drop the capital. The drop capitals look like this:
Lines: 2 3 4
Drop capital: A| A.| A..|
~' ..| ...| e... |
Lisp programmers boast that Lisp is a powerful language which can be built up from a very small set of primitive operations. Let's put that idea into practice by golfing an interpreter for a dialect called tinylisp.
Language specification
In this specification, any condition whose result is described as "undefined" may... |
Write a program or function that takes in three integers, a width w, a height h, and a step count s. You will be drawing a non-self-intersecting random walk s steps long on a 5*w by 5*h pixel image where every 5 by 5 pixel cell is either empty (pure beige) or one of these twelve simple "pipes":
The image above is enla... |
Let \$\mathbb{B} = \mathbb{Z}_2 = \{0, 1\}\$ be the set of booleans. A symmetric boolean function in \$n\$ arguments is a function \$f_S : \mathbb{B}^n \to \mathbb{B}\$ that checks if the number of its true arguments is in \$S\$, i. e. a function \$f_S\$ such that
$$f_S(\alpha_1, \alpha_2, \ldots, \alpha_n) = \left(\su... |
The Challenge
Given a valid regex, output a regex that that matches the same set of strings, but reversed.
The Task
This challenge uses the most basic regex operations: ^, $, ?, +, *, [], {}, |. There's no such thing as capture groups or any of that complicated stuff. Special characters can be escaped.
Sample Input/O... |
You have n coins which each weigh either -1 or 1. Each is labelled from 0 to n-1 so you can tell the coins apart. You have one (magic) weighing device as well. At the first turn you can put as many coins as you like on the weighing device which is able to measure both negative and positive weights and it will tell yo... |
Write a program that takes as its input a string consisting of printable characters (ASCII 20-7E) and an integer n in [2,16] and performs the following modification to the string.
Each character in the string is converted to its ASCII code (the examples given are in hexadecimal, though base 10 is also acceptable).
The... |
One nice property of a Turing-complete language is that it can be used to write any program, up to and including the simulation of the entire Universe.
Your job is to do exactly that: write a program which simulates the Universe.
Note: although I don't doubt you'll be able to accomplish this task, nowadays I don't hav... |
Create a program, that outputs a hello world string ("Hello world", "Hello, World" etc.), and source code. Output is written to stdout or equivalent. Hello world string is embedded in the source code.
For example, the output for might be
(some source code here)hello world(some source code here)
When the output is comp... |
3var is a variant of deadfish which uses three variables called A, B and R.
A and B are accumulators, while R is used as a result variable.
In this code-golf challenge, you need to make an interpreter for a stripped-down version of this language.
Required Commands:
i Increments A
d Decrements A
s Squares A
p ... |
The Interview: The Front Nine
This is the first of a series of challenges inspired by programming job interview questions.
You walk into the office where your potential future boss sits. "Come on in and sit down", he says. You nervously sit down, making sure your snappy yet professional attire is free of wrinkles. He a... |
Can you think of a regular expression that does not match itself?
|
Given an input date, your entry will output the full list of supported versions of the Ubuntu Linux distro on that date.
The full list of all releases is as follows:
Version Code name Release date Supported until
4.10 Warty Warthog 2004-10-20 2006-04-30
5.04 Hoary Hedgehog 2005-04-08... |
In a preference ballot there are many ways to decide who won. One of which is the Borda count method, where we give everyone point based on their places on the ballot.
For example, in these results:
10 5 7 2
_____________
1 a d a c
2 b a d b
3 c c b a
4 d b c d
The results are
1: a : 87
2: d : 60... |
In Vernor Vinge's excellent and fascinating book A Deepness in the Sky
(which, by the way, I highly recommend1), the Qeng Ho, a culture
that spans various star systems, has no notion of "days," "months," "years,"
etc., and hence has a unique timekeeping system that measures time entirely in
seconds. The most commonly ... |
Reverse and Invert a String
Challenge
In this challenge. You'll be writing a program which will output or return the input, reversed and inverted.
First, each character should be converted to its character code. Then, that should be converted to base-2. Following, that string should be reversed. After, the string shou... |
A Lyndon word is a string that is strictly lexicographically smaller than any of its cyclic rotations. Given a binary string, determine if it's a Lyndon word in as few bytes as possible.
For example, 001011 is a Lyndon word. Its rotations, listed below, are obtained by repeatedly moving the first symbol to the end.
00... |
Write a program or function that takes in a positive integer \$N\$ and a grid of decimal digits (\$0\$ to \$9\$) with width \$W\$ and height \$H\$ (which are also positive integers). You can assume that \$N\$ will be less than or equal to the larger of \$W\$ and \$H\$ (\$N \le \max(W,H)\$).
Print or return the largest ... |
Christmas is fast approaching and along with it, arranging the annual family Secret Santa. I'd like to try and get a head start on this, but making sure couples don't buy for each other keeps causing problems and despite doing this for years there's still the problem that Bob is pretty rubbish at buying gifts for most ... |
Quining has a long history - if you haven't heard of it, click the tag and read up a little on it.
Your Task
Output an infinite series of 1s (with no other spacing [newlines, spaces, etc.]) UNTIL SIGINT (typically CTRL-C) is called. When it is called, output the program source.
Rules
It must be a valid quine:
No rea... |
The infinite Fibonacci word is a specific, infinite sequence of binary digits, which are calculated by repeated concatenation of finite binary words.
Let us define that a Fibonacci-type word sequence (or FTW sequence) is any sequence ⟨Wn⟩ that is formed as follows.
Commence with two arbitrary arrays of binary digits.... |
When you round a number, if the next digit is >= 5 you add 1. For example:
3.1415926535 rounded to 1dp is 3.1
3.1415926535 rounded to 4dp is 3.1416 <-- Note the 5 changed to 6
3.1415926535 rounded to 5dp is 3.14159
3.1415926535 rounded to 9dp is 3.141592654 <-- Note the 3 changed to 4
You challenge is to receive ... |
Define that the natural number p is a +1 prime of the natural number n if p is a prime number and the standard binary representation (i.e., without leading zeroes) of p can be obtained by adding (i.e., prepending, appending or inserting) a single 1 to the standard binary representation of n.
For example, the binary rep... |
Who doesn't absolutely love permutations, right? I know, they are amazing––so much fun!
Well, why not take this fun and make it funner?
Here's the challenge:
Given an input in the exact form: nPr, where n is the pool taken from and r is the number of selections from that pool (and n and r are integers), output/return t... |
You saved the day with your prime sequence code, and the math teacher loved it. So much so that a new challenge was posed to the librarian (a/k/a, your boss). Congratulations, you get to code the solution so the librarian can once again impress the math teacher.
Start with the sequence of natural numbers in base-10, \$... |
Pick six cities or villages, one from each of the populated continents, Asia, Africa, North America, South America, Europe and Australia. The forecasts cover 8351174 places, more than 2 million in the US, 150000 in Pakistan, 10000 in Uganda, and 16 places in the Shefa province in Vanuatu, so I think you'll find a place... |
You have been employed by a data analysis company, and have been appointed the task of finding the average character of a string of characters. However, this company has limited funding for code storage, so your code must be as small as possible.
Task
Write a program or function that takes one string of characters as i... |
Your task is to give three different languages A, B, C, and write two different programs P and Q such that:
P is a quine in language A, but not a quine in B nor C;
Q is a quine in language B, but not a quine in A nor C; and
Q concatenated after P (without any new characters added in between) is a quine in language C... |
Across the alphabet
In this challenge, you have trouble remembering the letters of the alphabet. To circumvent this, you go up and down the alphabet, till you get to the letter.
Because you want your code to be portable, you'll be writing it with letter blocks. You have a limited amount of letter blocks because most o... |
These are raindrops:
! | . " :
These are clouds particles:
( ) _ @ $ &
I want you to verify, when given a block of text, whether or not it is raining. It is raining if, for every raindrop, there is a cloud particle somewhere above it. There must be one cloud particle for every raindrop. Output a truthy or falsy value... |
Write a program or function that:
takes in a string from stdio or arguments
replaces all occurrences of true with false and false with true
reverses it, but does not reverse true and false
returns or prints result
Examples (left side is input):
"true" "false"
"2false" "true2"
"tr... |
Lots of people like to play music for fun and entertainment. Unfortunately, music is pretty difficult sometimes. That is why you're here!
Task
It's your job to make reading music much easier for those struggling with it. You need to write a program or function that takes as input a musical staff, and outputs the names ... |
Write a program that accepts a single lowercase word as input and outputs the number of pairs of letters that have the same number of letters between them in the word as in the alphabet.
For example, in the word 'nature', we have 4 pairs:
nr: since there are three letters between them inside the word (a, t, u) and thr... |
In a steam-punk multidimensional world, our boss wants to affix printed index labels to each drawer in our conglomerate's multidimensional file cabinet.
The boss wants to typeset the entire label sheet as a single form, using a font bought only for this purpose, so we have to order the sorts (metal symbol pieces). Sinc... |
Anyone remember these things?
Your challenge today is to make the shortest program that involves your pet growing into 1 of at least 7 different creatures.
Your creature will grow into different forms depending on a random percentage from an RNG and the name you give it (from STDIN or equivalent for your language) a... |
Blade is a PHP templating engine. For this challenge, you only need to implement a modified version one feature -- text replacement.
Challenge Description
Given an input file and a map of keys to their replacements, write an interpreter that reads through the file to find double open braces ({{) followed by a key, foll... |
Write a program or function that takes in a string only containing the characters ^ and v (you can assume there will be no other characters). Read from left to right this string represents the sequence of mouse clicks a single user made while viewing a Stack Exchange question or answer for the first time.
Every ^ repre... |
You're playing TF2, and you want to make a bot that will just put voice commands into the chat box. Typically, to "call" a voice command, one would press a key (Z, X, or C) and a number (1-8) to create an audio dialogue. Here are the text equivalents of the audios displayed when pressing these keys:
Voice Menu 1
Defaul... |
Write the shortest program that takes one input (n) from STDIN (or equivalent) and outputs a simple incrementing function with one argument (x) that returns x + n but the function must be in a different language. Pretty simple!
This is code-golf, normal rules apply, shortest program wins.
Example: ><> to Python (Ungolf... |
Let's define a pristine program as a program that does not have any errors itself but will error if you modify it by removing any contiguous substring of \$N\$ characters, where \$1 \le N < \text{program length}\$.
For example, the three character Python 2 program
`8`
is a pristine program (thanks, Sp) because all the... |
Fibonacci + FizzBuzz = Fibo Nacci!
Your challenge is to create a Fibo Nacci program!
A Fibo Nacci program outputs the first 100 Fibonacci numbers (starting from 1).
If the Fibonacci number is divisible by both 2 and 3 (i.e. it is divisible by 6), then output FiboNacci instead of the number.
Otherwise, if the Fibonac... |
Executive summary
Given input k, find a partition of integers 1 to n into k sum-free subsets for the largest n you can within 10 minutes.
Background: Schur numbers
A set A is sum-free if its self-sum A + A = { x + y | x, y in A} has no elements in common with it.
For every positive integer k there is a largest integer ... |
Write a program or function that takes no input but prints or returns a constant textual depiction of a rectangle made of the 12 distinct pentominoes:
The rectangle may have any dimensions and be in any orientation, but all 12 pentominoes must be used exactly once, so it will have area 60. Each different pentomino mus... |
Your Task
Write a program using ASCII characters. Five alphanumeric (0-9, A-Z, a-z) characters will be inserted at random into your program's source code. Your task is to detect and output these characters inserted into your program.
Conditions
Your code cannot use any form of backup file.
Your code may produce any un... |
Introduction
In this challenge, your task is to write a program that decides whether two given trees are isomorphic.
A tree means a directed acyclic graph where every node has exactly one outgoing edge, except the root, which has none.
Two trees are isomorphic if one can be transformed into the other by renaming the no... |
In my Economics class, my friends and I like to come up with ways to rearrange the digits in the date (in MM/DD/YY) format to create a valid mathematical equation. For the most part, we are allowed to use addition, subtraction, multiplication, division, parentheses, and exponentiation in addition to concatenation.
Your... |
Calculate a product or ratio of SI units.
For example, kg m / s s (kilogram-meter per second squared) should return N (newton).
The input will always be either:
A list of symbols for SI units, space-separated (representing a product) or
The above, /, and the above (representing a ratio).
The input will never contain ... |
Challenge
Given a binary number as input through any means, "simplify" the number using a full program or a function.
Input
[binary]
binary is a number in binary that is over 0.
Output
Take the input, convert it to base 10 without using a builtin, then if that number contains only 1s and 0s, convert it into a base 1... |
Introduction
Write a complete program that rotates a rectangular block of ASCII characters 90 degrees clockwise. When the program itself is rotated 90 degrees clockwise, it rotates a block of ASCII characters 90 counterclockwise.
Rules
You many not use built-ins that rotate or transpose matrices. For example, in MATLA... |
You are given a partially filled Connect 4 grid (7x6).
O X
O X
X O X O O
X O X O X X
O X X X O O X
O O O X X O X
(Input can be given as a 1D or 2D array and as letters or numbers, etc.)
Assume that
X started the game.
Nobody has won yet.
Players may not have played well until now, but now... |
Given a positive integer k > 1 and a non-negative integer i, generate a k-tuple (or k-dimensional vector) of non-negative integers. For every k, the map from ℕ to ℕk, must be bijective. That is, every input i should produce a different tuple, and every possible tuple must be produced by some input i.
You may write a pr... |
Welcome to my first code-golf challenge! :) Let's hop right into it.
Challenge:
Given two floating point vectors, O (origin) and T (target), you have to create a program to print the values L and R to STDOUT.
O is one corner of the square
T is one corner of the square that is located opposite to O
L is the 2D point (c... |
Keep Talking and Nobody Explodes is a local multiplayer game where one player has control over a virtual "bomb", and has to be guided by another player, the "expert", who has access to a bomb defusal manual. One of the modules to be disarmed in the game is the keypad module, which is what we'll be dealing with in this ... |
Today, November 11, 2015, is Veterans Day in the United States. "Taps" is the bugle call played at U.S. military funerals:
("Taps" on SoundCloud from vtmiller)
It is a simple melody, only twenty-four notes long and using only four different notes. Here is the sheet music:
(source)
Challenge
Write a program or funct... |
Your task is to write a program that takes an input image and run it through edge-detection to become an output image.
The edge-detection works as follows (if unclear, see sobel edge detection):
The value for a pixel is the total brightness of a pixel, so if it is in color, you will need to convert it to grayscale fir... |
Calculate the p-adic norm of a rational number
Write a function or a program, that takes 3 integers m,n,p (where p is a positive prime) as input, that outputs the p-adic norm (denoted by |m/n|_p) as a (completely reduced) fraction. Fermat is known to have only very small margins, but what is rather unknown is that he o... |
The Task
I guess everybody loves automatic code generation and saving some time during work. You have to create a lot of classes and members during the day and you don't want to create all those getters manually.
The task is to write a program or function, that generates getters for all class members automatically for ... |
The task
In this challenge, your task is to write three programs that form a kind of mutual quine-like system.
Let's call the programs A, B and C.
If one of the programs is given the source of another program as input, it shall output the source of the third program.
For example, if A is given B as input, it outputs C.... |
You must use one language to write programs that perform the following nine tasks, in any order you want.
Convert an inputted number from base 10 to base 36.
Sample input: 1000
Sample output: RS (output must be upper case)
Convert each character in a string to its base 10 decimal ASCII codes and print the codes con... |
You sit at home, rubbing your hands in a most evil fashion. This time, I'll be able to set the community A-SPIN! I'll merely claim that I have proven this problem (which is of no doubt improvable) inside this book here… You open to the first relevant page. You scrawl those words…
You are, of course, the evil Fermat! Ha... |
I was recently adding up the ages of myself and my wife and kids and realised that at some point in the not-too-distant future our ages will all add up to exactly 100 years.
Challenge
For an input consisting of a combined (total) age and a list of birth dates, output the date on which the combined ages all add up to th... |
Background
It's late Friday afternoon and you and your friends decide to hit the pub later that evening, but before going to the pub you figure you should have a few beverages.
However, things escalate quickly; your friend Shaddock Pamplemousse won the lottery earlier this week and decided to bring crates upon crates w... |
No, I don't mean \$\phi = 1.618...\$ and \$π = 3.14159...\$. I mean the functions.
\$\phi(x)\$ is the number of integers less than or equal to \$x\$ that are relatively prime to \$x\$.
\$π(x)\$ is the number of primes less than or equal to \$x\$.
Let's say that "not pi" is then \$\bar{\pi}(x)\$ and define it to be the... |
Binary search is an algorithm that looks for an element in a sorted data-structure by constantly dividing the search space in half.
Rosetta Code
A binary search divides a range of values into halves, and continues to narrow down the field of search until the unknown value is found. It is the classic example of a "divi... |
First post here! I recently participated in a small friendly competition and this was one of the questions:
A positive integer whose only prime factors are 2, 3, 5 or 7 is called a humble number.
The first 20 humble numbers are:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27
Write a program of... |
Background
In most reasonable programming languages, it's very easy to rotate the rows or columns of a 2D array.
In this challenge, your task is to rotate the anti-diagonals instead.
Recall that the anti-diagonals of a 2D array are its 1D slices taken in the northeast direction ↗.
Input
A non-empty rectangular 2D array... |
Premise
One night, I was just contemplating on numbers. I found out about something unique about numbers like 7, 10, 12, 13, and more. They are squares of squares! Meaning, that when squared, are comprised of squares themselves. The OEIS calls them Squares which are a decimal concatenation of two or more squares.
Exam... |
Your challenge is to write a program that outputs the color of a given square from the chessboard. This is how a chessboard looks:
You can see that the square a1 is dark, and h1 is a light square. Your program needs to output dark or light, when given a square. Some examples:
STDIN: b1
STDOUT: light
STDIN: g6
STDOU... |
Write a program that counts up forever, starting from one.
Rules:
Your program must log to STDOUT or an acceptable alternative, if STDOUT is not available.
Your program must be a full, runnable program, and not a function or snippet.
Your program must output each number with a separating character in between (a newlin... |
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 spherical excess . The task ... |
Given a real number t in (-10^9,13) (not including -10^9 or 13) as input, output Γ(t), also known as the Gamma function, which is defined as follows:
You may not use a built-in Gamma function to solve this task, nor may you use built-in numeric or symbolic integration functions. Your output should be accurate to 6 sig... |
The Task
Write the shortest program, that accepts script in brainfuck from STDIN (or equivalent) and outputs to STDOUT (or equivalent) a program written in the SAME language you're using.
For example, if you write in Java, with the input
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<++++++++++++++... |
As someone who can't be bothered to look at their pentominos to see if it makes a rectangular shape, I've decided to make you write a program that does it.
Your task
Given some input split by newlines containing 12 unique characters, decide if it is a valid solution.
A valid solution MUST
Have 5 of each character (exc... |
I'm retiling my kitchen with different coloured tiles. In fact, it's going to have at least 2 colours - and 26 colours as a maximum.
But, I'm fussy. I want this wall to look random, but sometimes random isn't random enough.
So, when I lay out my tiles, I don't want to have any the same colour next to each other in the ... |
This is a rather simple challenge, but I couldn't find any question that was really similar to it. The challenge is to take a frequency in using STDIN or an equivalent, and then output a tone that matches that frequency, in Hz, for 5 seconds. For example
Input: 400
Output: (a tone of 400 Hz with a duration of 5 seconds... |
I came across SVGCaptcha, and immediately knew it was a bad idea.
I would like you to show just how bad an idea this is by extracting the validation code from the SVG images that code produces.
An example image looks like this:
Here is the source of the example image:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE s... |
If you express some positive integer in binary with no leading zeros and replace every 1 with a ( and every 0 with a ), then will all the parentheses match?
In most cases they won't. For example, 9 is 1001 in binary, which becomes ())(, where only the first two parentheses match.
But sometimes they will match. For exam... |
Given a properly-parenthesized string as input, output a list of all nonempty substrings within matching parentheses (or outside of all parentheses), with nested parentheses removed. Each substring should be the sequence of characters in exactly the same matching parentheses. Substrings should be listed in order of dep... |
In this challenge, you need to parse morgue files from the roguelike game Dungeon Crawl Stone Soup and output it to STDOUT.
What are these morgue files??
When you die, a text file is generated with that character's data inside. You can see what equipment the character had, what happened during the last few turns, and h... |
The Task
You are to write some ASCII Art Text as seen from this website for generating ASCII art!
Rules
Input will only be alphabetical text and spaces, and will be input as a single line. It is also case-insensitive.
You needn't fix if the output text is longer than the terminal width. As long as it would be correct i... |
Time for a new 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 complete pain when your PDF is not properly constructed and retains the hyphens in the layou... |
Write a program that fills in the paths of a grid of characters (ASCII 20-7E) according to the following rules.
The path is governed by eight directional characters: -, |, /, \, &, @, %, and *, as specified in the table below. The direction of the path will change when it reaches one of the eight above characters. Note... |
Starry is a funny esoteric programming language in which code consists only of +*.,`' where the actual command represented by each of those characters is determined by the number of spaces in front of it. That makes it tricky even to golf fixed-output challenges, because different commands can account for vastly differ... |
Your task is to write a program that, on input n, outputs the minimal expression of each number 1 through n in order. The shortest program in bytes wins.
A minimal expression combines 1's with addition and multiplication to result in the given number, using as few 1's as possible. For example, 23 is expressed as 23=((... |
Set Theoretic Arithmetic
Premise
There have been a couple challenges already that involve multiplying without the multiplication operator ( here and here ) and this challenge is in the same vein (most similar to the second link).
This challenge, unlike those previous, will use a set theoretic definition of the natural... |
Write a program or function that given some text, a number of columns, and the column width, formats the text into columns. This is plain text typography.
Rules
Input
The text will be a string of printable ASCII and may contain newlines and spaces (but not tabs).
The number of columns will be a positive integer.
The c... |
This serves as a catalog for tips related to golfing in Burlesque.
Burlesque is a lazy, esoteric programming language. It's mostly used on anarchy golf while popularity on Codegolf is not as high. However, this catalog is intended to be used by people golfing on anarchy golf as well.
Please only mention tricks and not... |
Objective Given an input of text that does not contain characters [ or ], perform the following actions:
For every instance of Amen with at least one capital letter (so all instances of Amen excluding amen), output that same Amen (retain capitalization).
For every instance of /all the people said[?: ]/i (that's a Regu... |
Your task is to compile regexes... by specifying a substitution for each character in a regex.
Regexes
The regexes support these
REGEX = (LITERAL REGEX / GROUP REGEX / STAR REGEX / ALTERNATIVE)
LITERAL = 1 / 0
GROUP = '(' REGEX ')'
STAR = (LITERAL / GROUP) '*'
ALTERNATIVE = '('REGEX ('|' REGEX)*'... |
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 chapter numbers. This c... |
I just had a lesson in school about alkanes and figured it would probably make for a great code golf challenge! Don't worry, it isn't as complicated as it may look!
A Quick Rehash
(Please Note: To keep this brief, not all information is 100% accurate.)
Alkanes are strings of carbon and hydrogen. Every carbon atom has 4... |
This is an Irregular Webcomic! themed task.*
Death is a rather extensive orginization, and, although Head Death has had no trouble telling his employees apart, certain other entities connected to the orginization have had trouble keeping track of them all.
Thus, your task here is to, given the title of one of the var... |
Well, turns out Doorknob's
username on GitHub, Reddit, and other sites is
KeyboardFire. That gives me an idea...
The task
You work at KeyboardFire Inc., a company that makes special keyboards. And, by
"special", I mean that, whenever you press a key, something in your house lights
on fire! With the new KeyboardFire Doo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.