instruction
stringlengths
34
53.1k
Challenge Given a matrix of digits (0-9), find the smallest (in terms of area) rectangular matrix of digits where one or more copies of itself, possibly rotated, can tile the original matrix. Reflection is not allowed (think of a collection of tiles on a wall or floor). Input can be taken in any reasonable ways to repr...
The goal of this challenge is to print the following tongue twister: She sells seashells by the seashore, The shells she sells are seashells, I'm sure. So if she sells seashells on the seashore, Then I'm sure she sells seashore shells. This is more complicated than just calling your language's print equivalent. Since ...
Given the measures of two of the interior angles of a triangle (x and y; the other angle can be easily calculated with 180 - x - y), draw a line segment that cuts this triangle into two isosceles triangles. You need to output the angle measures of both of your triangles. However, because the base angles are the same, y...
You are given a non-empty list of positive integers. Your task is to figure out how many distinct numbers can be obtained by applying the following algorithm: Remove either the first or the last item from the list and initialize N to the corresponding value. Remove either the first or the last item from the list. Let'...
This is the logo for LAPACK, a widely used software library for numerical linear algebra. Your task is to print the logo (color and matrix brackets not required) as this exact string. Trailing newline is allowed. L A P A C K L -A P -A C -K L A P A -C -K L -A P -A -C K L A -P -A C K L -A -P A C -K
Task Write a program/function that when given 3 positive integers \$a, b\$ and \$m\$ as input outputs a positive integer \$x\$ such that \$a^x\equiv b\ (\text{mod}\ m)\$ or that no such \$x\$ exists. A reference implementation can be found here. Constraints You can expect \$a\$ and \$b\$ to be less than \$m\$. Scoring ...
Challenge In this challenge, the input will be an ordered set of numbers and the program should be able to tell if the set of numbers is an Arithmetic Sequence. Input The input will be a list separated by ,(comma) or , (comma+space). The minimum length of the list should be 3 elements. Output The Output can be a Boo...
Challenge: Get the JavaScript string value containing only the "-" character using code only containing the following three symbols: +[]. Note: I'm not sure if this is possible. Scoring criterion: The number of bytes of code used. Why? I've set myself a challenge to be able to write code using only the above three char...
Back in 1965, The Beatles released their hit song 'Eight Days a Week'. In this code-golf challenge we are going to reimagine dates of the 21st century as if there really were eight days a week. Input A Gregorian calendar date between 1 January 2001 and 31 December 2100 inclusive. You may take input in any convenient fo...
So, this is a task from one very popular educational site in Russia: https://acmp.ru/index.asp?main=task&id_task=786&ins=1 Mathematically, you need to find the power of two not exceeding the given number, read from the standard input stream, and output their difference in the standard output stream. My python3 solution...
Well, last time I asked for an arithmetic sequence, now comes the geometric sequence Challenge In this challenge, the input will be an unordered set of numbers and the program should be able to tell if the set of numbers is a Geometric Sequence. Input The input will be a set separated by ,(comma). Output The Output ...
Tom the lumberjack is going to do his daily routine: chop trees. After all, it's his job to do so. His boss has ordered him to chop trees in a straight line marked with a special tape to identify them, so he knows which trees he is going to have to chop. However, Tom quickly realizes he has a problem. His axe will only...
Background Tents and Trees (try here) is a puzzle played on a square (or rectangular) grid, where the objective is to place tents horizontally or vertically adjacent to each of the trees, so that no two tents touch each other in 8 directions (horizontally, vertically, and diagonally) and the number of tents on each row...
Background Adám and I were once discussing a way to properly extend some features in Dyalog APL. I came up with the following extension to Take, a function that takes some front or back elements (and an analogous extension to Drop). We agreed that it was a good idea, but it was incredibly hard to come up with a piece o...
Input: from STDIN number of vertices in Graph \$2 \leq N \leq 100\$. Rules: [Code size] = max ([code length without spaces, tabs and newlines], [total code length divided by 4]) Math formulation: In the graph of N vertices, between each pair of vertices can be 3 road states: there is no road there is a road from A to ...
Description Your task is to implement a simple UNIX command parser and file system. Your program will have to implement a file system that can be modified via commands. The starting directory of your file system is an empty root directory /, with no subdirectories or files. Your program must be capable of handling the ...
Task Write a program/function that when given three 2d points in cartesian coordinates as input outputs a truthy value if they are collinear otherwise a falsey value Three points are said to be collinear if there exists a straight line that passes through all the points You may assume that the coordinates of the three ...
Your task is to turn a square root like this: √12 into a form like this: 2√3 For our purpose, we only need to output the left number here: 2 Test cases 4 -> 2 9 -> 3 12 -> 2 13 -> 1 108-> 6 Specifications You may assume for the input that \$n>0\$. \$n\$ has to be as large as possible. If the number is already a ...
Task Given a positive integer return the geologic era and period it was that many million years ago. Input/output The input is a string or integer; the output is a string. Eras and periods are separated by slashes (/). Input will always be between 0 and 542 inclusive Data The possible outputs for eras and periods and t...
Background A Hamiltonian path is a path on a graph that steps through its vertices exactly once. On a grid, this means stepping through every cell exactly once. On a square grid, a Chess King can move to a horizontally, vertically, or diagonally adjacent cell in one step. Challenge Count the number of Hamiltonian paths...
Background We all know about distributivity, i.e. \$a(b+c) = ab + ac\$. This is a property on 2 different operations, namely addition and multiplication. But indeed, nothing can stop us from studying distributivity of 1 operation. In this challenge, you will be studying a kind of left-distributive operation. Task Given...
Because I forgot to celebrate Pi Day (14.3), let's celebrate with \$\pi\$, \$e\$ (Euler's number) and music! Challenge No, we don't have time to eat a pi-pizza, let's make a program. What you need is \$500\$ digits of \$\pi\$, and \$10\$ digits of \$e\$. The input is an integer \$n\$ between \$0\$ and \$499\$ inclusiv...
Given a \$2\times N\$ maze, determine if you can get from the start top left corner to end bottom right corner using only up, down, left, and right moves. Input A \$2\times N\$ block (\$1 \le N \le 100\$) of your choice of two distinct characters, one representing walls and the other representing empty tiles that can b...
I've been posting relatively hard challenges recently, so here goes an easy one. Task Given an array \$A\$ and a number \$n\$, calculate the sum of all numbers of \$A\$ multiplied by \$n\$, except the last one. All numbers (the elements of \$A\$ and the value of \$n\$) are positive integers, and \$A\$ is non-empty. Sho...
The problem You just got a new job, hurray! You expect to be given various interesting tasks, and be able to learn a lot in the next few months. Good news, your boss gave you your first work this morning. You are now in charge of... Writting adresses on envelopes. Yay. Fortunatelly, you are not required to write everyt...
The periodic table gets its shape from the arrangement of elements into blocks: An element is assigned its block based on what type of orbital holds its valence electron(s). For instance, the sole valence electron of neutral hydrogen occupies the 1s orbital in the 1s subshell, and so hydrogen belongs to the s-block. T...
Print this tree: 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 15 20 15 7 21 35 35 21 7 8 28 56 70 56 28 8 9 36 84 126 126 84 36 9 252 462 462 924 1716 171...
Laguerre polynomials are nontrivial solutions to Laguerre's equation, a second-order linear differential equation: \$xy''+(1-x)y'+ny=0\$. For a given value of \$n\$, the solution, \$y\$, is named \$L_n(x)\$. To avoid trivial solutions, the polynomials are non-constant except for \$n=0\$. The polynomials can be found wi...
This time I will give you an easy challenge: Print the Om sign with \$\pi\$!(Sorry for many challenges with \$\pi\$) Here is the om sign drawn using pi numbers: 59 0 64 230781 3.14159 26 502884 535 83279 1971 89 433 6939 79 44 937 ...
Challenge Given the Cartesian coordinates of two or more distinct points in Euclidean n-space (\$\mathbb{R}^n\$), output the minimum dimension of a flat (affine) subspace that contains those points, that is 1 for a line, 2 for a plane, and so on. For example, in 3-space (the 3-dimensional world we live in), there are a...
Background As you maybe know Ramanujan made this magic square by \$4x4\$ Matrix: This works like all magic squares. But the special thing in this square is that his birthdate is hidden in the first row, the 22\$^{nd}\$ Dec 1887. Challenge Can you make one for your birthdate? Input The User will give Input in this form...
Our boolean operators are AND, OR, XOR, NAND, NOR, XNOR and, in conjunction with one of those operators, NOT. Our numbers are \$1\$ and \$0\$. The challenge is to write a program or function that calculates the results of the input. Input A string, array or other input format of your choice; containing alternating numb...
Sandbox Many of us have seen math problems where a shape made of unit cubes is dipped in paint, and the answer is the number of painted sides. We'll generalize that problem in this challenge. Input A 3-dimensional matrix of 0s and 1s. Output A non-negative integer Challenge Given a n by m by k matrix of 0s and 1s, we c...
Sequel to Verify Tents and Trees solution. Background Tents and Trees (try here) is a puzzle played on a square (or rectangular) grid, where the objective is to place tents horizontally or vertically adjacent to each of the trees, so that no two tents touch each other in 8 directions (horizontally, vertically, and diag...
Background Peter's Father, the Teacher of a dance-club, asks Peter a question: Given are two natural numbers (\$\mathbb{N}\$ \$x\$ and \$y\$). \$x\$ is the number of the garment types (e.g. shorts, shirts\$\dots\$) we have \$y\$ is number of colors (e.g. green, blue, \$\dots\$) of each garment we have. In the dance cla...
When encountering a problem whose input is meant to be read sequentially, but you may also want to push back onto the input like a stack, which languages have the optimal boilerplates for doing so, and how? For example, from Create a Boolean Calculator, we have a string like: 1AND0OR1XOR1 We want to "pop" 5 chars 1AND...
Background In the sport of Table Tennis (aka Ping-Pong or Whiff Whaff), two opponents play a sequence of rounds, where each round consists of players hitting a ball back and forth until one player (may or may not be the server) gains a point. Table Tennis has some official rules that make for a good game, but we will u...
My phone number (which I will not be sharing here) has a neat property where there is a two digit number, which when iteratively removed from my phone number will eventually remove all the digits. For example if my phone number were abaababbab Then by repeatedly removing ab we would eventually get nothing (I encluse ...
Objective Given a matrix of connected box drawing characters, count its genus, the number of plane sections it encloses. Valid input The box drawing characters are ─│┌┐└┘├┤┬┴┼╴╵╶╷ (U+2500 U+2502 U+250C U+2510 U+2514 U+2518 U+251C U+2524 U+252C U+2534 U+253C U+2574 U+2575 U+2576 U+2577). The matrix shall contain these c...
Given two strings as input, return the result of XORing the code-points of one string against the code points of the other. For each character in the first input string, take the code-point (e.g. for A, this is 65) and XOR the value against the corresponding index in the second string and output the character at the co...
Let's begin with a thought experiment. You have a clock and a timer, in which you start the timer when the clock shows exactly hh:mm.00. Clock: The clock employs 24-hour time. So the range of hh is 0<=h<23. (Because 23 inputs are unsolvable, you aren't required to handle that) Timer: It starts exactly on 00.00. The nu...
As it turns out, Python allows for 1j for to be compressed to 1jfor. However, jfor sounds like xnor. Since all similar-phonic phrases have something in common, there must be some property shared between jfor and xnor. If we look at the ASCII representation of the first two characters of jfor in binary, we see: j: 110...
Ah, Tinder . . . the app that takes the code golf approach to online dating. With just a few well-chosen right swipes and a bit of luck (or a cute puppy pic), you too could have more matches than /(?!)/. This code-golf challenge involves Tinder dates of a very different kind. Given a Tinder version number as input, hoo...
Objective Given a vertex figure consisting of regular convex polygons, determine whether it represents a convex uniform polyhedron. What is a uniform polyhedron? A uniform polyhedron is a polyhedron whose faces are regular polygons, while having the same vertex figure for each vertices. Generally a uniform polyhedron c...
Inspired by this Task Your task is to output the average character of your code. What is an average character? Say we have a string golf(). We then take the ASCII value of each separate symbol, so our string is 103 111 108 102 40 41, and calculate the average of those values, rounded to an integer. In our case the aver...
Background In Minesweeper, you will often encounter a horizontal or vertical wall of one's and two's (not yet revealed cells are marked as ?): ... 1 1 1 1 2 2 2 1 2 1 1 ... ... ? ? ? ? ? ? ? ? ? ? ? ... ... A B C D E F G H ... It is equivalent to a problem of recovering zeros and ones in a boolean array when only wind...
Imagine a grid where the origin square \$(0,0)\$ is at the top left of the screen, and positive \$x\$ is rightwards whereas positive \$y\$ is downwards. Coloured squares are at various positions on the grid. In a magical void separate from the grid are multiple snake-like strips of squares, each of a fixed length and a...
Introduction This problem is a challenge that has to do with DOM manipulation at scale and overcoming some issues that may be inherent in dealing with the DOM. This challenge is interesting because limitations push us to think through things differently and lean on the strengths of languages different than what we usu...
Background A magic square is an n×n matrix consisting of one of each of the integers from \$1\$ to \$n^2\$ where every row, column, and diagonal sum to the same value. For example, a 3×3 magic square is as follows: 4 9 2 3 5 7 8 1 6 Here, each row, column, and diagonal sum to the magic sum of 15, which can be calculat...
Background Sometimes in calculus you're expected to calculate the sum of an infinite series. Sometimes these series are very friendly, like a geometric series, but add anything else onto it and it can quickly get complicated to solve by hand. Sometimes I like to be lazy - a lot of sums can be found simply by adding the...
The Cantor function is continuous everywhere and constant almost everywhere, but has an average slope of 1: The function can be found recursively: \$f_0(x)=x\$ \$f_{n+1}(x)=\left\{\begin{matrix}\frac{1}{2}f_n(3x)&x\in[0,\frac{1}{3})\\ \frac{1}{2}&x\in[\frac{1}{3},\frac{2}{3})\\ \frac{1}{2}+\frac{1}{2}f_n(3x-2)&x\in[\f...
The task is to to compete for the shortest regex (in bytes) in your preferred programming language which can distinguish between English and Spanish with minimum 60% 90% accuracy. Silvio Mayolo's submission (pinned as Best Answer) has secured his spot as the winner of original contest against any chance of being contes...
Introduction: Inspired by the Puzzling-stackexchange post with the same name, which I've answered four years ago: Can you create a perfectly valid English sentence, which makes perfect sense, but which contains the word "and" in it, five times consecutively in a row ? "Something-or-other and and and and and something-...
Background Milking the deck is the name given to the following card shuffling method: 'Pinch' the deck to remove the top and bottom cards simultaneously. (With lots of imagination, this action resembles milking a cow.) This pair of cards forms the base of a new pile. Repeat, adding each pair of cards to the top of the...
A superpermutation on n symbols is a string which contains every permutation of n symbols in its body. For instance, 123121321 is a superpermutation on three symbols because it contains 123, 132, 213, 231, 312 and 321 as substrings. The Challenge Given a string composed of n unique symbols (and, optionally, n), output ...
Since this is a answer-chaining challenge, you might want to sort answers by oldest. Your task is simple: Choose any printable ASCII character that's not chosen in the previous answers. And then, you need to print your chosen character in your program to standard output. (You can ONLY print your chosen character, with...
A ripoff of this challenge. Go upvote it! Objective Given a rational number amongst \$[0,1]\$, apply the Cantor function to it and output the rational number that's produced. The Cantor function The Cantor function is continuous everywhere and constant almost everywhere, but has an average slope of 1: The Cantor funct...
This is the cop's thread of a cops-and-robbers challenge. You can view the robber's thread here A pretty common beginner style question is to print some string, but there's a catch! You need to do it without using any of the characters in the string itself! For this challenge, we will find out who is the best at printi...
This is the robber's thread of a cops-and-robbers challenge. You can view the cop's thread here A pretty common beginner style question is to print some string, but, there's a catch!, you need to do it without using any of the characters in the string itself! For this challenge we will find out who is the best at prin...
Related puzzle: Pathfinder (available on Puzzle Picnic) Background A robot is standing on a cell of a rectangular grid, where each cell has one or more gems except for the one with the robot. The robot can move to a horizontally or vertically adjacent cell in one step, and it picks up one gem from the cell it steps on....
In this question at Code Review they tried to find the fastest way to return the unique element in an array where all the elements are the same except one. But what is the shortest code that accomplish the same thing? Goal Find the unique element in an array and return it. Rules The input array will contain only integ...
Task Given a matrix, your program/function should output a row-equivalent matrix in checkerboard form ( \$A_{ij}=0\$ if and only if \$i+j\$ is odd). Two matrices are defined to be row-equivalent if and only if one can be obtained from the other by a sequence of elementary row operations (EROs), where each ERO consists ...
Background I feel that for a site named code-golf we have a shockingly little amount of golf being played. Let's fix that. Challenge Determine whether the hole of a minigolf course can be reached after exactly a certain number of movements and whether it can be reached at all. How to play Inputs are an integer "power l...
Summary Videos which are sped up every time a particular word is said exist for everything from the Bee Movie to the classic Rick Roll. The goal for this challenge is to figure out how much you'd have to slow down the sped-up video in order to match the duration of the original video. For example, the original Bee Movi...
Background A linear recurrence relation is a description of a sequence, defined as one or more initial terms and a linear formula on last \$k\$ terms to calculate the next term. (For the sake of simplicity, we only consider homogeneous relations, i.e. the ones without a constant term in the formula.) A formal definitio...
Legendre's Conjecture is an unproven statement regarding the distribution of prime numbers; it asserts there is at least one prime number in the interval \$(n^2,(n+1)^2)\$ for all natural \$n\$. The Challenge Make a program which only halts if Legendre's conjecture is false. Equivalently, the program will halt if there...
There are two types of people in this world: users and admins. Let's find out who the real admins are. The task is simple: If the script is run with elevation, print 'True' and only 'True' (only trailing newlines permitted as extra). If the script is run as an unelevated user, print 'False' and only 'False', exceptions...
Paper Folding for the win "How many times can you fold a paper?" - This well known question led to many arguments, competition, myths and theories. Well, the answer to that question depends on many properties of the paper (length, strength, thickness, etc...). In this challenge we will try to fold a piece of paper as ...
I am looking for a more efficient way of computing the following. Let A and B be two vectors of non-negative integers of length a and b. Let A0 and B0 be the padded versions of A and B, so that we pad the vectors by 0, until their lengths are a+b. We now want to compute sort(A0 + pB0) where pB0 ranges over all distinct...
Shift Tac Toe Shift Tac Toe is a game that combines Tic Tac Toe and Connect 4 together. In this game, you start with a 3 by 3 board, and each row is connected to a slider that you can move left and right. At the start, the sliders all start to the very right(this means that you can't move the slider to the right on the...
Task Take the (integer) number of human years that the dog has lived, \$n\$, as input and return its age in dog years, \$d\$, to two decimal places. The number of human years, \$n\$, will be between \$1\$ and \$122\$ inclusive: \$n \in [1,122], n \in \Bbb{N}\$. According to BBC's Science Focus Magazine, the correct fun...
I think everyone is familiar with the game of snakes & ladders1. Imagine we have a 10x10 board like this: ============================================================= | | | | | | | | | | | | 100 | 99 | 98 | 97 | 96 | 95 | 94 | 93 | 92 | 91 | ------+-----+-----+-----+---...
A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative. The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here: \$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\en...
Draw an ASCII-art rainbow! Input An integer between 0 and 1000, inclusive. Examples Input 0: /\ || Input 1: _ / \ | | Input 2: __ / \ | | Input 3: ___ / \ | | The first row is a space followed by n underscores. The second row is a slash followed by n spaces, and a backslash. The third row is a pipe follow...
Write a cat program, a quine, and a Hello World in the same language such that when two specific programs of the three are concatenated in a certain order, you get the third program. It does not matter which program is the first, second, and third are as long as all three types are represented once each. e.g. if \$A\$ ...
Thin Paper Folding This is a "lighter" version of the challenge Paper Folding for the win. This challenge is being posted as a different challenge with many modifications in order to try and get wider range of interesting answers. For anyone who is answering the first challenge, I marked the changes with bold (also no...
Challenge We once had a challenge to count domino tilings of m by n grid, and we all know that, for any fixed number of rows, the number of domino tilings by columns forms a linear recurrence. Then why not have a challenge to compute the linear recurrence?! Let's define \$D_m(n)\$ as the number of domino tilings on a g...
Given a directed network, with a single source and a single sink, it is possible to find the maximum flow through this network, from source to sink. For example, take the below network, \$G\$: Here, the source is node 0 and the sink 5. We can see, from the minimum cut-maximum flow theorem, that the maximum flow throu...
Inspired by this Puzzling challenge. Challenge Given a 2D rectangular grid where each cell is either an empty space or a wall, find the path (or one of the paths) from the top left cell to the bottom right, which satisfies the following: Only movement to one of four adjacent cells is allowed. The path breaks (or passe...
Description Count how many occurrences there are of the digit 1 between two given numbers \$[a, b]\$, inclusive. For example, from 1 to 100 it should be 21: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91, 100 The number 1 is repeated 21 times. Rules Each number in the input list is guarant...
I was doing the bandit wargame from overthewire.org and because I am a script kiddie, I googled the answer for level 24. password="UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ" for i in {0000..9999} //looping to try any possible pin code do echo $password' '$i >> wordlist.txt //save password and possible pin code into wordlist ...
RollerCoaster Tycoon 2's maze is the inspiration for this question. Credit to Marcel Vos for thoroughly breaking the classic RCT2 AI. The pathfinding AI in this question is the AI in the latest version of OpenRCT2 at the time of writing, which was updated in response to that video. Suppose a guest enters a \$w \times...
Introduction Programmers have already solved the trolley problem (a classical problem in philosophy). In the usual trolley problem, we have a directed graph and each edge is weighted by the number of people tied to the track (edge). The objective of the usual trolley problem is to find a path through the graph that min...
The challenge. Make a program that produces a random series of 8 notes in the scale of E minor, and then harmonizes them. Details. Notes must be represented in output as a 1-2 char string, which designates the note and if it is sharped or not, followed by a number, which designates the octave. Examples would be C3, D#...
This is a rock paper scissors competition. Algorithms will face each other in 100 rounds of rock paper scissors. Except that the algorithms will also be able to read the source code of each other! Leaderboard 1. Chaos Bot (by Aiden4) - 27 Points, 168 bytes 2. Anti-99%-of-posts (by Lyxal) - 24 Points, 489 bytes 3. Psued...
What is the shortest way to secure a site with Javascript? I am new to Code Golfing, and this is what I've come up with so far. I bet that this could be improved though: Challenge: Make a script which redirects http:// to https:// with the least bytes of code Attempts: Original code (150ish BYTES!): if (window.locati...
The sequence discussed in this challenge is a variant of the Descending Dungeons sequence family. Specifically, the sequence generation rules: (A_b = A's base 10 representation read as a base b number, A = A_10) A(0) = 10 A(n) = 10_(11_(12_(...(n+9)_(n+10)))) Your goal is to make a program which accepts a nonnegative ...
You are James and four of your friends (Bjarne, Eich, Rossum, Ada) are called for an interview. There are n interviewers, and they can each serve one person at a time, alphabetically. Each round of interview takes 20 min. Let's take n = 2, So, the first round started with Ada and Bjarne, takes 20 min (they're handle...
The task is simple. You are given a string with alphabetical words (say "Hello world, this are tests"). You have to return the mode of the lengths of words in the string. In this case, output is 5, as it's the most often length of words in the string. Definition of an alphabetical word (for this challenge): a string th...
Source Code Byte Frequency Write a program that get a single byte character as an input and prints the frequency of that byte in the program's source code as an output. Examples: Assuming my program is: ab#cd%b then the output of the program should be (each line is a separate execution): input output ----- ...
This is a challenge to write bots to play the 1st and 2nd players in the following simple poker game. Rules of the poker game There are two players, A and B. Each antes $10 into the pot, and is dealt a card, which is a real number in the range [0, 1). Player A goes first, and may pass or bet. If A passes, then there is...
Inspired by this Puzzling challenge, and easier version of my previous challenge. Challenge A 2D rectangular grid is given, where each cell is either an empty space or a wall. You start at the top left cell, and you need to exit through the bottom right cell. You can move to one of four adjacent cells in one step. You ...
You probably know the game mastermind: The player tries to guess a code of 4 slots, with 8 possible colors - no duplicates this time. Let's call those colors A through H, so possible solutions could be ABCD or BCHD. Each time you place a guess, the game master will respond with two information: how many slots you got r...
Put simply, you are to print out the following number: 0202020100110020122120012121100120121020202100012110002002010110211221012021112010200012112021220120022222102211121110110201220020202001111212210010100222100112101201122100222120201002002020200011110002211002202100022210212020112002020000120222111121112002112101000...
Create a program that can be run in 4 different languages such that: One language prints "Hello World!" One language outputs its own source code One language outputs 99 bottles of beer on the wall, that is: 99 bottles of beer on the wall 99 bottles of beer Take one down, pass it around 98 bottles of beer on the wall ...
I'm letting this one out of the sandbox. Hopefully it is well-written and make sense, feel free to improve. So in order to make 1+ more popular (and ease the creation of golfed 1+ text-printing programs) here comes the metagolf challenge: The 1+ Language 1+ is a fun deque-based esolang where 1 is the only literal, and ...
Write the shortest possible program to remove all partial matched duplicates from a list and only retain the longest lines. Sort order does not matter. For following inputs, the intent is to search for the string reminder followed by a number and retain the longest unique reminder + number lines. Some rules reminder i...
Given a positive number n, rotate its base-10 digits m positions rightward. That is, output the result of m steps of moving the last digit to the start. The rotation count m will be a non-negative integer. You should remove leading zeroes in the final result, but not in any of the intermediate steps. For example, for t...
Given a distance in meters as an integer \$60\le d \le 260\$, return the number of clubs that may be used according to the following arbitrary chart, where both \$min\$ and \$max\$ are inclusive: club | min | max ----------------+-----+----- Driver | 200 | 260 3-wood | 180 | 235 5-wood ...
The TV series "Breaking Bad" replaced the letters Br and Ba with a periodic-table like representation, printing [Br35]eaking [Ba56]d. Create a program that takes a string input, does a replacement and prints an output. The replacement shall subsidize any substring that matches an element symbol with the notation demons...