instruction
stringlengths
34
53.1k
Ok I've been on a bit of a triangle kick recently so here's another one. Clark's Triangle is a triangle where the leftmost entry of each row is 1 and the rightmost entries are made up of multiples of 6 which increase as the row number increases. Here's a visualization 1 6 1 . 12 1 . . 18 1 . . . 24 1 . ...
Whenever you make a move on a Rubik's Cube, there is a reverse move which undoes the first move. Because of this, every algorithm (set of moves) has a reverse algorithm which undoes the first algorithm. The goal of this challenge is to find the reverse of a given algorithm. Specification: The input consists of an array...
Given a positive integer n ≤ 500: Find the smallest positive integer k such that all digits in the decimal representation of n*k are either 0 or d, with 1 ≤ d ≤ 9. Print or return d in less than 30 seconds (read more about that in the Clarifications and rules section). Easy examples Here are the first 30 values of d....
Inputs: Two single digits (let's call them m and n) and two chars (let's call them a and b) in your input format of choice. Output: For the walkthrough, pretend m=2, n=5, a='a', b='b'. Your output will be a string built from your four inputs. Let's call the string result, with value "". First, concatenate a onto result...
Although related challenges have been asked, this one is different to warrant its own question. Challenge Given a positive integer, return the longest sequence of consecutive positive odd integers whose sum is the given integer. If no such sequence exists, you may report an error in whatever way makes sense for your l...
Inputs A list (array) of numbers, or numerical strings if that makes it easier. You can assume there will always be at least two elements in the list and every element will be a natural number (integer larger than zero). Outputs A single number, or again, a numerical string. Problem The idea is to reduce the list of nu...
Related: Interquine Program A outputs program B's code when run, and B outputs C's source, and C outputs A's source. This time you can't exchange two characters and exchange again :) Requirements: Only one language across all programs Standard loopholes restrictions apply All programs are different. One program th...
Background There's a common riddle that goes something like this: A snail is at the bottom of a 30 foot well. Every day the snail is able to climb up 3 feet. At night when they sleep, they slide back down 2 feet. How many days does it take for the snail to get out of the well? The intuitive answer is 30 days, becau...
your task is to write a program that uses the Lucas-Lehmer primality test to check whether an input number is prime or not. This prime number candidate has the form 2p-1 with p being prime. (Mersenne prime number) The Lucas-Lehmer-test The n-th Mersenne number is prime if it is a divisor of the (n-1)-th Lucas-Lehmer nu...
The task is as follows: Given a positive integer x and a prime n > x, output the smallest positive integer y such that (y * y) mod n = x. An important part of this question is the time limit specified below which excludes brute force solutions. If there is no such value y then your code should output N. Test cases (2...
If we write a sequence of numbers as the coefficients of a power series, then that power series is called the (ordinary) generating function (or G.f.) of that sequence. That is, if for some function F(x) and series of integers a(n) we have: a(0) + a(1)x + a(2)x^2 + a(3)x^3 + a(4)x^4 + ... = F(x) Then F(x) is the gener...
In the game of chess, there is piece called the queen that may attack any other piece that is on the same row, column or diagonal. In chess there are typically two sides, black and white, with each piece belonging to one of the teams. Pieces may not attack pieces belong to the same team. Your goal is to find out the ...
Introduction This is the evolution of this previous challenge which was about checking satisfieability of normal formulae in conjunctive normal form (CNF). However, this problem is NP-complete and watching algorithms finish is just boring, so we're gonna simplify the problem! Specification Input You may tune the follow...
Two numbers are coprime if their greatest common divisor is 1. Given a positive integer N, your task is to compute the first N terms of OEIS A061116, which is the sequence of positive integers higher than 1 that are coprime to all their decimal digits. Here are the first few terms of the sequence: 11, 13, 17, 19, 21, 2...
Background A super-prime is a prime number whose index in the list of all primes is also prime. The sequence looks like this: 3, 5, 11, 17, 31, 41, 59, 67, 83, 109, 127, 157, 179, 191, ... This is sequence A006450 in the OEIS. Challenge Given a positive integer, determine whether it is a super-prime. Test Cases 2: f...
Given a string and integer n, split the string at n character, and print as follows: Ex) laptop 3 should print lap top laptop 2 should print la pt op (see how it splits the string at every 2nd char) Special cases: laptop 0 should print laptop (since we split at every 0th char, thus none) laptop 9 should print laptop (...
Challenge Given a string, make it into a triangle as shown below: Input Hello, world! Output H He Hel Hell Hello Hello, Hello, Hello, w Hello, wo Hello, wor Hello, worl Hello, world Hello, world! The first line contains the first character of the string. The following lines contain one more character on each line, u...
Lorem Ipsum is placeholder text used when preparing layout without wanted to have content already filled. One of its key features over using some arbitrary text is that it is nonsense. It isn't even valid latin (though it is close). This prevents anyone being shown the layout from becoming distracted reading the text. ...
Challenge Given a positive integer, return the product of its divisors, including itself. This is sequence A007955 in the OEIS. Test Cases 1: 1 2: 2 3: 3 4: 8 5: 5 6: 36 7: 7 8: 64 9: 27 10: 100 12: 1728 14: 196 24: 331776 25: 125 28: 21952 30: 810000 Scoring This is code-golf, so the shortest answer in each language...
Your task will be to write a Haskell function that takes a list of integers and returns a sorted version of the same list. You are to do this without the use of builtins What are builtins? To keep ourselves from having to navigate edge case hell we are going to limit answers to Haskell (sorry if Haskell is not your fa...
Description Given a length n, and an alphabet size k>0, your program must determine the number of strings with those parameters which have a maximal number of unique substrings. In the case of k=2, this generates OEIS A134457. Example For example, 2210 has the substrings , 2, 22, 221, 2210, 2, 21, 210, 1, 10, and 0, ...
A prime is weak if the closest other prime is smaller than it. If there is a tie the prime is not weak. For example 73 is a weak prime because 71 is prime but 75 is composite. Task Write some computer code that when given a prime greater than 2 as input will determine if it is a weak prime. This is a standard decisio...
The Fibtraction sequence (as I call it) is similar to the Fibonacci sequence except, instead of adding numbers, you subtract them. The first few numbers of this challenge are: 1, 2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123, -199, 322, -521, 843, -1364... The sequence starts with 1 and 2. Every next number can be calcu...
The task is to find a non-trivial factor of a composite number. Write code that finds a non-trivial factor of a composite number as quickly as possible subject to your code being no more than 140 bytes long. The output should just be the factor you have found. Your code can take input and give output in any way that i...
Imagine travelling to a point lying A miles away horizontally and B miles away vertically from your current position. Or in other words, travelling from (0, 0) to point (a, b). How far would you need to end up travelling? This seems like a straightforward question, but the answer depends on who you ask. If you're a cro...
Say I have an expression: 9 * 8 + 1 - 4 This expression can be interpreted in six different ways, depending on operator precedence: (((9 * 8) + 1) - 4) = 69 (* + -) ((9 * 8) + (1 - 4)) = 69 (* - +) ((9 * (8 + 1)) - 4) = 77 (+ * -) (9 * ((8 + 1) - 4)) = 45 (+ - *) ((9 * 8) + (1 - 4)) = 69 (- * +) (9 * (8 + (1 - 4))) = ...
A Sophie Germain Prime is a prime number P such that 2P+1 is prime as well. Given a prime number as input, your task is to determine whether it is a Sophie Germain Prime. Standard Input/Output rules and Default Loopholes apply. This is a decision-problem, so standard rules for this tag apply (returning two distinct and...
Using named matching groups is often easier to understand than numbering groups but takes up more bytes. Given a regular expression as specified below, your program or function must convert named groups to numbered groups. Task These specifications are based on python 3's re module. A named group takes the form of (?P<...
General rules The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in tim...
A biquadratic number is a number that is the fourth power of another integer, for example: 3^4 = 3*3*3*3 = 81 Given an integer as input, output the closest biquadratic number. Here are the first 15 double-squares: 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 10000, 14641, 20736, 28561, 38416, 50625 This is code-golf s...
Version 2 here. Simple challenge: given an integer, draw a house of cards with the given number of stories. If the number is negative, draw the house upside-down. Examples: Input: 2 Output: /\ -- /\/\ Input: 5 Output: /\ -- /\/\ ---- /\/\/\ ------ /\/\/\/\ -------- /\/\/\/\/\ Input: 0 Output...
A number is a Chen prime if it satisfies two conditions: It is prime itself Itself plus two is either a prime or a semi-prime. A prime is a number where it has exactly two divisors and those divisors consist of itself and one. A semi-prime is a number which is the product of two primes. (Note that 12 = 2*2*3 is not s...
Introduction Don't worry - no knowledge in mathematics is needed. It is possible to just skip the motivation part, but I think it is nice if a puzzle has a background story. Since the title contains the number I there will be more puzzles of this kind, if you like them. Feedback is highly appreciated. I hope you have f...
INTRO Let's say you write a passage and you are close to the end of the line wanting to write down a large word. In most languages, you just leave some blank and move to the next line, like a sir. Example - English: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah this man is ...
Given a non-negative integer, return the absolute difference between the sum of its even digits and the sum of its odd digits. Default Rules Standard Loopholes apply. You can take input and provide output by any standard Input / Output method. You may take input as a String, as an Integer or as a list of digits. Th...
You are going to participate in a gameshow. One of the challenges works as follows: The first room contains a large number of identical balls. The second room contains a series of chutes, each of which has a sensor which counts how many balls have been placed in it. A ball which is placed in a chute cannot then be rec...
You are to write a program that takes a list of strings as input. For every string in the list you are to determine the smallest N such that no other string in the list begins with the same N characters as the string in question. Now compose a new list with all these strings. Here is an example, on the left we have ...
Related Your goal, is to write a set of programs, that progresses from one to the other, one character at a time. For example. Given the starting program abcd and the ending program wxyz, you should have 5 valid programs, with the respective outputs. abcd -> wbcd wbcd -> wxcd wxcd -> wxyd wxyd -> wxyz wxyz -> wxyz As ...
Help! My Completely Automated Lights From Darks Separator V3001.01 broke! :( Guidelines Task Write a program that will take an input of an array (or a list in some languages) of any amount of strings that are either the letter L or the letter D (representing lights or darks) and output an array that contains two arra...
This challenge is based off of Helka Homba's question Programming a Pristine World. From that question, the definition of a pristine program is: 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 ...
You have to write a program or a function in any language that outputs this pattern: ~|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||~ |~|||||||||||||||||||||||||||||||||||||||||||||||||||||||||~| ||~|||||||||||||||||||||||||||||||||||||||||||||||||||||||~|| |||~|||||||||||||||||||||||||||||||||||||||||||||...
Thanks to FryAmTheEggman for the idea for this second version. Version 1 here. Not-so-simple challenge: given a number of cards, build the biggest house of cards you can with that number of cards, according to the following building order: /\ /\ /\ /\/\ ...
Guidelines Scenario John has an important number, and he doesn't want others to see it. He decided to encrypt the number, using the following steps: His number is always a non-decreasing sequence (ie. "1123") He converted each digit into English words. (ie. "123" -> "ONETWOTHREE") And then, rearrange the letters random...
Your task is simple: write a program that receives an integer as input and outputs it if it was odd, and does nothing otherwise (not halting is allowed). The challenge is, that you can only use odd bytes. You can optionally append a trailing newline to the output. This is code-golf, shortest answer in (odd) bytes wins....
We seem to quite like digit runs lately, so here's a fairly simple challenge. Given a positive integer, split it into it's digit runs, and return the product. For example: 11122333 would become 111, 22, 333, the product of which is 813186 Input may be taken as an integer, string, or list/array of digits/characters. You...
Given a list (array) of names, your challenge is to join the items using some glue and abbreviate the longest items first until the joined string fits a maximum length. And output that string. Since the glue is part of the final string, the length of the glue is included too Abbreviation is done using the … character ...
Task Write a program that will take (as input) a positive integer. It will then count up from 0, appending each integer to a String, only continuing if the length of the String is less than the value of the input. A serialized integer is defined as the fully-formed integer with the maximum value belonging to the Strin...
Lets say your job is to paint poles, and a client asks you to paint a pole with 4 red sections and 3 yellow sections. You can do that pretty easily as follows: r y r y r y r With just yellow and red stripes. Now lets say your client asks you to paint a pole with 2 red sections, 2 yellow sections, and 1 green section...
A Harshad number is a number that is divisible by the sum of its digits. This is obviously dependent on what base the integer is written in. Base 10 Harshad numbers are sequence A005349 in the OEIS. Your Task: Write a program or function that determines whether a given integer is a Harshad number in a given base. ...
There was a challenge up a while ago about multiplying strings. It showed us how we can multiply not only numbers, but also strings. However, we still can't multiply a number by a string properly. There has been one attempt to do so but this is obviously wrong. We need to fix that! Your Task: Write a function or pr...
Given a positive integer n (Example: n=1234444999) Separate into consecutive digit runs: [1, 2, 3, 4444, 999] Take the digital product of each run. [1, 2, 3, 4*4*4*4, 9*9*9] = [1, 2, 3, 256, 729] Sum it... 991 Repeat until this converges to a single number: 1234444999 991 82 10 1 Return last number. Test...
Write 3 programs that do the following task: Let A, B, C source codes of those three programs; if A runs BC is produced as output, if B runs CA is produced, if C runs AB is produced; so each program writes a string (cycled for each program) and hides itself from it. Additional, but essential constraints: standard lo...
Note: This is related to a variation of the game Rummikub Background & Rules Rummikub is a tile-based game. There are four colors: red, orange, blue and black. For each color there are 13 tiles (labeled from 1 to 13), and there are also 2 Jokers which are color-independent, hence there are 54 pieces in total. In this ...
Probably a simple code-golf challenge. Given 2 positive integers m and n, make a list of n values that are positive integers whose sum is equal to the number m. Either all values in the output are the same value or the difference is exactly 1. Examples For example m=6 and n=3 would become 2, 2, 2 m=7 and n=3 would bec...
Let's define a sequence of positive integers. We will define the value of the sequence at every even index to be double the previous term. The odd indices of the sequence will be smallest positive integer not yet appearing in the sequence. Here are the first couple terms. 1,2,3,6,4,8,5,10,7,14,9,18,11,22,12,24,13,26,...
Background Python 3 has many types of string literals. For example, the string this 'is' an exa\\m/ple can be represented as: 'this \'is\' an exa\\\\m/ple' "this 'is' an exa\\\\m/ple" r"this 'is' an exa\\m/ple" '''this 'is' an exa\\\\m/ple''' """this 'is' an exa\\\\m/ple""" r'''this 'is' an exa\\m/ple''' r"""this 'is' ...
A Gaussian integer is a complex number whose real and imaginary parts are integers. Gaussian integers, like ordinary integers, can be represented as a product of Gaussian primes, in a unique manner. The challenge here is to calculate the prime constituents of a given Gaussian integer. Input: a Gaussian integer, which i...
A slightly more challenging one compared to my previous challenge. Given a list of positive integers (>0) and the positive integer m, output a list of positive integers that are capped values of the input values so that the sum of the capped values equals m. Cap the highest values first. And keep the same order. Cases ...
Inspired by github.com/JackToaster/Reassuring-Parable-Generator, in turn inspired by xkcd.com/1263. The possible words are derived from the reassuring.cfg of that repository. Having a look at the reassuring.cfg (use the 12th commit) is suggested to see the grammar the output matches (The output is a list of all strings...
The task is to write code to identify which key is pressed on the keyboard. You can assume that only one key is pressed at a time and that there is a standard US keyboard layout. That is the layout with the @ over the 2. Your code should output a unique identifier for any key pressed. This includes PrtScn, Scroll Lock,...
An integer is binary-heavy if its binary representation contains more 1s than 0s while ignoring leading zeroes. For example 1 is binary-heavy, as its binary representation is simply 1, however 4 is not binary heavy, as its binary representation is 100. In the event of a tie (for example 2, with a binary representation ...
The first two MU-numbers are 2 and 3. Every other MU-number is the smallest number not yet appeared that can be expressed as the product of two earlier distinct MU-numbers in exactly one way. Here are the first 10 2, 3, 6, 12, 18, 24, 48, 54, 96, 162 Task Given a positive number calculate and output the nth MU-number...
There are lots of challenges that just pick a sequence from oeis and ask you to print n-th number or first n numbers or whatever. It's time to stop automate! Task Your task is to parse a sequence page from oeis.org and print its index, description and example values. The page's index should be chosen and random, sele...
Title stolen inspired by Greg Hewgill's answer to What's the difference between JavaScript and Java? Introduction Java and JavaScript are commonly used languages among programmers, and are currently the most popular tags on Stack Overflow. Yet aside from similar names, the two have almost nothing in common. In honor of...
Imagine a histogram. Pour an infinite amount of water on to it. Then stop. How much water does the histogram hold? Let's say we have a histogram with columns of these heights: 1 3 2 1 4 1 3 That would look like this: # # # # ## # # ####### 1321413 If we pour an infinite amount of water on this histogram, some ...
Write a program or function to produce the following output in the correct order. EDIT: The symbols are not mathematical! The numbers just represent unique data and the + and - could be any two arbitrary symbols. Take an non-negative integer input n. The first line is always -, even for n=0. If the current line is -, ...
Background I play D&D on a regular basis with some friends. While talking about the complexity of some systems/versions when it comes to rolling dice and applying bonuses and penalties, we jokingly came up with some additional complexity for dice rolling expressions. Some of them were too outrageous (like extending sim...
Seahorses, of course, need shoes. However, a seahorse, having just one tail, needs just one shoe. Unfortunately, the shoes only come in pairs. Money is tight for the seahorse government, so they need to buy as few pairs as possible. Each seahorse has a shoe size x where x is a positive integer. However, a seahorse can ...
A Bell number (OEIS A000110) is the number of ways to partition a set of n labeled (distinct) elements. The 0th Bell number is defined as 1. Let's look at some examples (I use brackets to denote the subsets and braces for the partitions): 1: {1} 2: {[1,2]}, {[1],[2]} 3: {[1,2,3]}, {[1,2],[3]}, {[1,3],[2]}, {[2,3],[1]}...
As everyone knows, adding inator-3000 to the end of any noun makes it way cooler. But what else can make a word cooler? Given an ASCII string as input, output the coolness of the word. Calculating the coolness There are 4 elements to calculating the coolness of a word. The word itself. The base score is the number of ...
Task Given an input, evaluate it as a mathematical equation following the order of operations. But, instead of the using PEMDAS, we drop the parentheses and exponentiation and introduce spaces - SMDAS - spaces, then multiplication & division, then addition & subtraction. How does that work? Every operator with more spa...
ASCII reflections in a box You probably all know the Law of Reflection, in this challenge you'll visualize the trajectory of a ball in a box. Related: ASCII Ball in Box Animation and ASCII Doodling: Laser in a Box Task You're given three integer pairs W,H, x,y and dx,dy - the first represents the size of the box, the s...
There are one hundred members of the United States Senate. Assuming that nobody filibusters and that the Vice President isn't cooperating, at least fifty-one members are necessary to pass a bill. But some members work together better than others, entropy-wise. Your task: Output the last names of at least 51 of the US s...
Given an array of positive integers, output an array of all the elements that are greater than or equal to the adjacent ones. Most elements will have two adjacent elements; the first and last element are special cases, as they only have one adjacent element. You may assume that the array contains at least two elements....
For this challenge you are going to make a function (your function may be a complete program) that takes a list as input and returns a permutation of that list. Your function must obey the following requirements. It must be deterministic. Composing your function with itself a variable number of times should be capabl...
Challenge closed, the shortest answer has been acccepted. A military projection is a projection where all lengths and the angles in the X-Z plane remain unattuned. Your task is to print a cube in military projection using /, |, \, -, and any whitespaces you want, given any integer greater than zero as it's side length....
You love lunch. However, you are on a diet and want to make sure you don't accidentally eat lunch twice in one day. So you need to make a program to help you make sure. However, one complication is that you eat lunch on a very weird schedule. The time you eat lunch at is MONTH:DAY PM (you can use UTC or localized time ...
It is widely known that Santa Claus delivers presents to houses all over the world in December. However, not many people know what he does during the rest of the year. You see, Santa enjoys a jolly good prank, and he'll often find himself pranking entire cities when he's not busy making or delivering toys. One place t...
Inspired from a real problem; we were looking at this table and said "Hey, now that's a good codegolf problem." The KOOS Jr. scores converts from a raw number to a percentile score given this table: Raw summed score Interval score (0-28) (0 to 100 scale) 0 100.000 1 91.975 ...
You will be given a positive integer as input. The integer is the board of a seesaw. Th integer will not have leading zeroes. You may take this input however you like. Your task is to output the location of the pivot point of this seesaw, such that the board would balance. A board balances if the moments on each side a...
Your task is to make a program that prints out its own source. "Hey, we already have this challenge, and tons of variations of it! Why are you making another one?" you may ask, but this one is going to be one of the most difficult ones (hopefully, anyway). Your quine must be "mutation-hardened", which means the quine, ...
For the question Find the highest unique digit , here is my answer : 9A,sqfe=W%X#- At the end I am essentially trying to achieve a lastIndexOf. I do that by reversing my array, using indexOf, and subtracting from 9. This adds 4 (9 W % -) extra bytes to get from indexOf to lastIndexOf. Furthermore, if I didn't know my...
Your task, if you wish to accept it, is to write a program that outputs a positive integer (higher than 0). The tricky part is that if I duplicate your source code, the output must be double the original integer. Rules You must build a full program. That is, your output has to be printed to STDOUT. The initial source...
This is a variant of Play the word chain and Building a long chain of words . The input is a non-empty list of unique words at least 2 chars long made of characters in [a-z]. You need to output the length of the longest possible chain, where each subsequent word starts with the last letter of the previous word. You ca...
Lets take a set of integers greater than 1 and call it X. We will define S(i) to be the set of all members of X divisible by i where i > 1. Would like to choose from these subsets a group of sets such that Their union is the set X No element of X is in two of the sets. For example we can regroup {3..11} as ...
You have given an array from which we need to remove duplicates. Rules: First or immediate duplicates gets removed first. Array contains natural numbers a[i]>0 for i>=0 no. of elements in the array is greater than 1 i.e. n>1 e.g. {1,2,3,4,5,5,4,6,6,7,8}=> {1,2,3,7,8} {1,2,3,3,4,5,6,7,7,8} => {1,2,4,5,6,8} {1,1,3,3,...
Description I guess everyone knows the fairy tale of Rapunzel and the prince. For those who do not: read it here. However, Rapunzel had just had her hair cut, so it might not be long enough to let her prince climb up! She may get very sad.. Challenge Your task is to write a function that evaluates what Rapunzel will be...
Inspired (like 2 others) by this chat message. (and to some extent, my CMC) Given a string as an input, your task is to check whether or not that string is a number. What is a number? This is a list of all input formats that are "numbers": Integers: An integer is a string made entirely of characters from 1234567890, w...
The graph of the modulo operation (\$y = x \mod k\$) looks like this: This is a very useful function, as it allows us to create "wrapping" behavior. However, it is very cumbersome when I want to use it to create an appearance of "bouncing" between two walls. The graph of the "bounce" function (\$y = \text{bounce} (x, ...
Background Sometimes, people think you didn't work at your git project. But - you can prove yourself with git shortlog -n. Now, the problem is you are a programmer and programmers are lazy. So you want to write a program which shows the person who committed at most. Rules You may not do the following things: use git s...
Don't you hate it when you can't remember how to craft something in Minecraft? Well, time to remedy that! Task Your task is to take an input, either as a 1D or 2D list and output what item is a result of the crafting table! Input You may take input as either a string or a list of length 9 or a 2D nested array. If you t...
Description Chicken McNugget numbers are numbers that can be expressed as a sum of \$6\$, \$9\$ or \$20\$ - the initial sizes of the famous Chicken McNuggets boxes sold by McDonald's. In that sum, a number may occur more than once, so \$6 + 6 = 12\$ is such a number too, and the number must "contain" at least one of th...
The RGB color value #00FF00 is a rather important one: it is used to make movies, TV shows, weather announcements, and more. It is the famous "TV green" or "green screen" color. The Challenge Your task is to write a program that takes two input images, both in PNG format (or in your image library's image object type) a...
Inspiration: Heavily inspired by Smallest chess board compression I decided to make a similar but distinctly different competition. tl;dr Take the file Chess_Games.txt and compress it as much as you can so that you can expand it to the original file. Objective: Write an algorithm to encode and decode an entire chess da...
Your challenge is to output a Base64-encoded version of your source code, and optionally a line break. You must output the correct padding, if any. Standard quine rules apply, shortest answer wins. It must be a valid RFC 4648 encoded base64 string, with no linebreaks (except optionally a trailing newline). Test cases: ...
From the wikipedia: Net neutrality is the principle that Internet service providers and governments regulating the Internet should treat all data on the Internet the same, not discriminating or charging differentially by user, content, website, platform, application, type of attached equipment, or mode of communicatio...
In this challenge you have to make an ascii pulsing heart with rhythm problems (Heart arrhythmia) and then measure the pulse.Don't worry it's easy! Making the heart The heart alternates between these 2 states: state 1 ,d88b.d88b, 88888888888 `Y8888888Y' `Y888Y' `Y' state 2 d8b d8b ...
If you are not familiar with Braid-Theory I recommend that you read this first. This question assumes that you are at least familiar with the concepts at hand and assumes you are well familiar with group-theory Let us define \$\sigma_n\$ to be the braid in which the \$n\$th strand (One indexed) from the top crosses ...
Guidelines Task Write a method that takes an array of consecutive (increasing) letters as input and that returns the missing letter in the array (lists in some languages). Rules This is code golf so the shortest answer in bytes wins! You will always get a valid array There will always be exactly one letter missing Th...
Based on this challenge. In the rhythm game osu!, the difficulty modifier "Double-time" actually only increases the speed by 50%. Your task, is to write a program that outputs a positive even integer (higher than 0), and when each byte/character (your choice which) in your source code is duplicated, it should output th...