instruction
stringlengths
34
53.1k
Minesweeper is a popular puzzle game where you must discover which tiles are "mines" without clicking on those tiles. Each tile is either a mine (represented by *) or a clue, i.e. a number from 0 to 8 representing how many of the 8 neighboring tiles are mines. Your task today is to take a board containing the mines and...
Consider the number 99999999. That number is obviously a palindrome. The largest prime factor of 99999999 is 137. If you divide 99999999 by 137, you get 729927. This number is also a palindrome. The largest prime factor of 729927 is 101. 729927/101=7227 which again is a palindrome. The largest prime factor of 7227 is...
This challenge was inspired by this Wendy's commercial from 1984. Illustration by T S Rogers Your task is to find a hexadecimal 0xBEEF on a binary bun. The 'beef' consists of the following pattern: 1 0 1 1 (0xB) 1 1 1 0 (0xE) 1 1 1 0 (0xE) 1 1 1 1 (0xF) And the 'bun' consists of a 12x12 binary matrix, such as: 1 ...
Introduction Suppose you have a ruler with numbers from 0 to r-1. You place an ant between any two of the numbers, and it starts to crawl erratically on the ruler. The ruler is so narrow that the ant cannot walk from one position to another without walking on all the numbers in between. As the ant walks on a number for...
100 Prisoners and a light bulb You may have seen this puzzle over on the puzzles exchange or perhaps heard it somewhere else. If you are unfamiliar with this puzzle check out: 100 Prisoners and a Light bulb The gist of this puzzle is that there are 100 prisoners, each one is separated from one another and must go into...
Background: Jack is a pumpkin that enjoys spooking the citizens of the villages near his pumpkin patch every Halloween. However, every year after someone lights the candle inside of him, he has a limited amount of time to spook everyone before the candle burns out, thus being unable to spook any more villagers because...
(inspired by this question over on Math) The Definitions Given an n x n square matrix A, we can call it invertible if there exists some n x n square matrix B such that AB = BA = In, with In being the identity matrix of size n x n (the matrix with the main diagonal 1s and anything else 0), and AB and BA representing usu...
The Zen of Python must surely be one of the most beautiful Easter eggs in any language. (It is created by writing import this) So why not create a version for your own language? For those who don't have access to Python 2 or 3, your code should output the following: The Zen of [YOUR LANGUAGE] Beautiful is better than ...
Halloween is almost here, the holiday after which most people need to wean themselves off a hollow diet of sugar. Write a program that takes in a positive integer. If the integer is less than 31 (1 through 30), output this ASCII-art jack-o'-lantern, looking to the right as if looking forward to Halloween: _____I_____ ...
This challenge is straightforward, but hopefully, there are plenty of avenues you can approach it: You need to print/return a valid JSON object of at least 15 characters, not counting unessential whitespace. Your program should work without any input. In the interest of clarity, a JSON object starts and ends with curl...
Introduction Emoji use a particular alphabet for their national flags, which allows one to put two symbols together to create the appropriate flag. Your challenge, is to transform any uppercase letter into the appropriate Flag Identifier. This may be much harder for languages that do not innately handle Unicode. Each ...
Again inspired by a task for Programming 101 here's another challenge. Input: A positive integer n >= 3. (has to be odd) Output: n lines of asterisks, where the first line has n asterisks and every new line has two asterisks less than the line before. Until hitting 1 asterisk. From there every new line has two aster...
Task Given an input n, calculate the n-th decimal digit of pi Rules Answer can be a full program or a function. Input must be taken from stdin or from function arguments. Output must be either sent to stdout, the return value of a function, or written to a file. all n values between 0 and 20000 must be supported (can ...
Sequence: We start at 1. We first add the current 1-indexed value to the previous number in the sequence. Then we apply the following mathematical operations in order if they apply to this current value: Divisible by 2? => Addition Divisible by 3? => Subtraction Divisible by 4? => (Addition AND) Multiply Not divisib...
Golf Challenge Given the below ASCII "Green". | | | |> | | | | | O | | | | | | | | | | | | | Let | Denote a wall Let | Denote half the flag pole Let > Denote the flag on the pole Let O Denote the hole Let o Denote the ball The dimens...
You've seen the amazing alphabet triangle, the revenge of the alphabet triangle and now it's time for the revenge of the revenge of the alphabet triangle! Introducing... THE ALPHABET DIAMOND! Your task is to output this exact text, lowercase/uppercase does not matter, though newlines do: bcdefghijklmnopqrstuvwxyzazyxw...
We've had a lot of alphabet challenges. For this challenge, you are passed the output of an alphabet challenge, and you need to output the pattern scaled to size N. For example, if N=5 and you were passed the L-phabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ BBCDEFGHIJKLMNOPQRSTUVWXYZ CCCDEFGHIJKLMNOPQRSTUVWXYZ DDDDEFGHIJKLMNOPQR...
Your task is to print this exact text: z yz xyz wxyz vwxyz uvwxyz tuvwxyz stuvwxyz rstuvwxyz qrstuvwxyz pqrstuvwxyz opqrstuvwxyz nopqrstuvwxyz mnopqrstuvwxyz lmnopqrstuvwxyz klmnopqrst...
Since Halloween is coming up I thought I might start a fun little code golf challenge! The challenge is quite simple. You have to write a program that outputs either trick or treat. "The twist?" you may ask. Well let me explain: Your program has to do the following: Be compilable/runnable in two different languages. D...
N in a row Input: The character and a 2-Dimensional array. The array with a size of N x N where 1 <= N <= 26, it will be filled randomly like so: N = 1 A N = 2 B | A ----- A | B N = 3 A | B | C ---------- B | A | B ---------- C | A | C As N increases by 1, so does the number of letters. A = 1, B = 2, C = 3. There wi...
According to this site a general rule recommended by The U.S. Government Printing Office Style Manual is Capitalize all words in titles of publications and documents, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, or, and nor. This might not be true as I'm unable to find such a recommendation i...
The task: You have to input 2 numbers and output the results of several operations done with them. Details: Input 2 floating point numbers, x != 0 and y != 0 via stdin, command line or function arguments. Output x+y, x*y, x^y (pow(x,y), not x XOR y), x-y, y-x, x/y and y/x on ST...
Monday, October 31st, is Halloween. And it got me thinking -- I wonder what other months have the last day of the month also be a Monday? Input A positive integer in any convenient format representing a year, 10000 > y > 0. The input can be padded with zeros (e.g., 0025 for year 25) if required. Output A list of the...
Cheat is a card game where you're trying to get rid of your hand. A turn looks something roughly like this: Determine what card rank you have to play that turn. In most variants this is one rank higher than the previous turn. Play 1-4 cards, face down. These don't have to match the valid rank. If they don't, it's cons...
Your task is to print this exact text: az za abyz zyba abcxyz zyxcba abcdwxyz zyxwdcba abcdevwxyz zyxwvedcba abcdefuvwxyz ...
The goal is simple: Output a nonzero real solution x to the equation sin(x) = -mx, given input m, in the fewest number of bytes. Specifications: Your answer must be correct to 3 significant figures. You may output any real solution other than the trivial solution x=0. You can assume m is such that at least one soluti...
The goal is to output the number of the months given as input in a compact concatenated form which is still parsable if one knows the construction rules: If either: January is followed by January, February, November or December; or November is followed by January or February There must be a separator placed between. ...
Given the width and height of a line in characters, draw it using ascii characters. Input Two integers separated by a space, the first one being the width, the second one being the height. Example: 5 3 Output An oblique line formed with the characters /\|_, that has the width and height given in the input. The characte...
This is different from My Word can beat up your Word as it is less complex and only requires you to calculate it, and not compare them. To find the digital root, take all of the digits of a number, add them, and repeat until you get a one-digit number. For example, if the number was 12345, you would add 1, 2, 3, 4, and...
In Chinese, numbers are written as follows: 1 一 2 二 3 三 4 四 5 五 6 六 7 七 8 八 9 九 10 十 For numbers above 10, it is expressed as the number of tens and the number of ones. If there is only one ten, you do not need to explicitly say one, and if there are no ones, you don't need to put anything after: 11 十一 24 二十四 83 八十三 90...
xkcd is everyone's favorite webcomic, and you will be writing a program that will bring a little bit more humor to us all. Your objective in this challenge is to write a program which will take a number as input and display that xkcd and its title-text (mousover text). Input Your program will take a positive integer a...
Bailey–Borwein–Plouffe Iterations We've seen a few pi challenges on PPCG, but none that specifically dictate the algorithm you should be using. I'd like to see implementations of the Bailey–Borwein–Plouffe algorithm in any language up to iteration n. The formula is as follows: Your algorithm should output each iterati...
Input An array that can contain arrays or positive, consecutive, ascending integers. The arrays can have any number of arrays inside of them, and so on and so forth. No arrays will be empty. Output This array simplificated How to simplificate an array We will use the array, [1, [2, 3], [[4]], [[[5, 6], 7, [[[8]]]], 9]]...
The cool stuff The following rosace can help calculate numbers modulo 7. In order to do that, you must start at 0 and turn clockwise a number of steps given by the first digit. Then, for each successive digit, follow the arrow and then turn clockwise the number of steps given by that digit. Here is how you proceed for...
Here's an ASCII pumpkin carved into a Jack-o-Lantern. Isn't it cute? ((^v^)) Here's an ASCII ghost. Look how spooky it is! \{O.O}/ Obviously, the pumpkins have to be on the ground, with a space between them so they don't rot. Ghosts, however, like to stand on top of pumpkins, so they're even spookier. However, they h...
A Pythagorean triple consists of three positive integers a, b, and c, such that a2 + b2 = c2. Such a triple is commonly written (a, b, c), and a well-known example is (3, 4, 5). If (a, b, c) is a Pythagorean triple, then so is (ka, kb, kc) for any positive integer k. A primitive Pythagorean triple is one in which a, b...
(Note: this is an easier spin-off of my previous challenge Find the Infinity Words!, which is a spin-off of my other previous challenge Find the Swirling Words! :) ) Definition of a Wavy Word: If you connect with curves all the characters of a Wavy Word on the alphabet (A-Z) you obtain the path of a wave continuously ...
Chained Binary Operations Here's a challenge involving truth tables and binary operations. For this specific challenge, your task is to use the following table of operations: To create a function that takes in two inputs f(p,a), where p is the initial truthy/falsy value and a is a list of tuples representing multiple ...
Given a string that contains only lowercase letters, encode that string with the alphabet cipher. To encode with the alphabet cipher (I will be using the example hello): First, convert each letter in the string to a number depending on its position in the alphabet (a = 1, b = 2, etc.) Example: 8 5 12 12 15 Pad each nu...
Given a string to encode, and a number of columns (the key), encode the string as follows: I will be using the example Hello, world! and the key 3 First, write out the number of columns: 1 2 3 Next, write the text starting from the upper left, one character per column, and when you run out of columns, go to the next l...
Your task is to write some code in Python 2 or 3 such that this expression: (a+b)(c+d) == a*c + b*c + a*d + b*d will evaluate to True without raising any exceptions. To clarify, I will copy your code into a file, then from the file import *. Then I will type the expression into the console and verify that it is True. ...
Intro The Switching sequence is defined like so: Start with n people standing in a circle (6 for this example). 1 2 6 3 5 4 Starting from person 1, the person that is to the left of the "chosen" person is removed. 1 6 3 5 4 The removed person can "switch" the removal method up: If the removed person is ...
I am interested in seeing programs which don't ask for any input, print a googol copies of some nonempty string, no less, no more, and then stop. A googol is defined as \$10^{100}\$, i.e., 1 followed by a hundred 0's in decimal. Example output: 111111111111111111111111111111111111111111111111111111111111111111111111......
Your task is to print the titles of the questions with the five highest scores (upvotes minus downvotes) here on CodeGolf.SE, while skipping over any closed, locked and on-hold questions. Currently these are: Produce the number 2014 without any numbers in your source code Showcase your language one vote at a time Ameri...
Given an odd integer N (5 <= N <= 51), generate a maze with side length N that follows the following requirements: The maze must be composed of the characters | - and +. It must use the | character as a vertical wall, the - character as a horizontal wall, and if that wall turns, the character + should be used. The wid...
Background Bathroom Etiquette, when pertaining to the available urinals, states that the next urinal to be filled in should be the one that minimizes the total discomfort. The total discomfort equation is given by the following set of equations: dist(x,y) = linear distance between person x and person y in Urinal Units...
Your challenge is to write a program or function that, when given two strings of equal length, swaps every other character and outputs/returns the resulting strings in either order. Examples "Hello," "world!" --> "Hollo!" "werld," "code" "golf" --> "codf" "gole" "happy" "angry" --> "hnpry" "aagpy" "qwerty" "dvorak" -->...
A simple Markov Model will be used in this question. For more information about Markov Chains, see http://setosa.io/ev/markov-chains/. Take a string. For this example, we will use the word: reader Now, for each character, take the characters that appear after each occurence of the character in the string. (​`^`​ repre...
The challenge Output an array or string representation of Dürer's famous magic square: that is, 16 3 2 13 5 10 11 8 9 6 7 12 4 15 14 1 Some properties of this square, which can perhaps be exploited, are: It contains each integer from 1 to 16 exactly once The sum of each column or row, as well as the the sum...
When babies open their mouths, they're not just spewing gibberish. They're actually talking in a highly advanced, adult-proof cipher... The Baby-talk Cipher When a baby talks, it could look something like gogooa gagooook aagaaoooy Each single-space separated section represents a character (so the example above represen...
The challenge Your task is to animate Adve the Adventurer moving through a creepy (i.e. Halloween) maze. Adve is a •; he's character fluid, though, so he does not mind being represented by a different character. To animate Adve, you print out each frame; a frame is the map with his current location in it. Adve moves on...
Introduction I defined the class of antsy permutations in an earlier challenge. As a reminder, a permutation p of the numbers from 0 to r-1 is antsy, if for every entry p[i] except the first, there is some earlier entry p[i-k] such that p[i] == p[i-k] ± 1. As a fun fact, I also stated that for r ≥ 1, there are exactly ...
A string is pairable if it can be split into subtrings, each of which is a string repeated twice consecutively. For example, aabaaababbbaba is pairable as: aaba aaba b b ba ba Given a non-empty string of a's and b's, output a Truthy value if it's pairable and a Falsey value if it isn't. Pairable: aa abaaba bbababbb aa...
Given a sequence of 625 32-bit unsigned integers (that is, in the range [0, 2**32)), output which of the following pseudorandom number generators generated the sequence: Linear Congruential Generator Xorshift Mersenne Twister Specifically, the C implementations of these three generators used for this challenge are as...
Seems like an impossible task right? Well, it's actually not that hard. If we write the word Infinity as 8-bit binary ASCII code, we'll get: 01001001 01101110 01100110 01101001 01101110 01101001 01110100 01111001 This can be concatenated, and converted to the decimal value 5291279215216915577. Now that's a number we c...
Review First, let's review the Simple Substitution Cipher. To encode a string in the Simple Substitution Cipher, replace each letter in your string with another letter. A letter may not be used to replace more than one existing letter. For example, if I was encoding the text Hello world, my name is Oliver! I like code...
Background Back in the late 90's / first 00's when Flash Web Design was so much cool that noone could live without having a full Flash website, or at least an animated widget, I was hired to develop a "horse races viewer" in Flash/Actionscript, in the shape of an 80's videogame style animation, so the site's visitors c...
Given a number as input, determine how many significant figures it has. This number will should be taken as a string because you have to do some special formatting. You'll see what I mean soon (I think). A digit is a sig-fig if at least one of the following apply: Non-zero digits are always significant. Any zeros bet...
Given a positive integer n, output the 2^n binary sequences of length n sorted in the following precise ordering. Test cases: 0: 0 or 1 (defining this is a matter of debate) 1: 0 1 2: 00 01 10 11 3: 000 001 010 100 011 101 110 111 4: 0000 0001 0010 0100 1000 0011 0101 1001 0110 1010 1100 0111 1011 1101 1110 1111 e...
Your task is to palindromize a string as follows: Take the string. abcde Reverse it. edcba Remove the first letter. dcba Glue it onto the original string. abcdedcba But here's the catch: since this challenge is about palindromes, your code itself also has to be a palindrome. Remember, this is code-golf, so the code...
Given a palindrome generated according to this challenge, depalindromize it. Test cases abcdedcba -> abcde johncenanecnhoj -> johncena ppapapp -> ppap codegolflogedoc -> codegolf As this is about depalindromizing, your code cannot be a palindrome. Remember, this is code-golf, so the code with the fewest bytes wins.
Background When I was in elementary school, we used to play a game in math class that goes as follows. All kids sit in a big circle and take turns counting, starting from 1. However, the following numbers must be skipped while counting: Numbers that are multiples of 3. Numbers that have a 3 in its decimal representat...
inspired by Count down from infinity Given a non-negative integer N, output the number of repetitions of the following steps it takes to reach 0: Convert N to binary (4812390 -> 10010010110111001100110) Flip each bit (10010010110111001100110 -> 01101101001000110011001) Trim leading zeroes (01101101001000110011001 -> 1...
Note: this is heavily inspired by this question. Task: Your task is to generate the nth prime, when each character of your program is repeated n times in place. Let's say your program is: Derp Every character in there is repeated once, so it should output 2. When every character is duplicated in place, like so: DDeerr...
Given a string, first square it as follows: First, write the string. abcde Next, write the string rotated one left. abcde bcdea Keep doing this until you have written len(string) lines. abcde bcdea cdeab deabc eabcd Now, read from the string like this: ----+ +--+| |+>|| |+-+| +---+ Which gives: abcdeabcdcbaedcbcdea...
Your task is to determine the palindromic degree of a given non-empty string. To do this, loop until one of the following conditions are met: The string is not a palindrome. You encounter a string that has already been encountered. And do the following: If it is a palindrome, add one to the degree. Depalindromize. ...
Introduction: Like Twitter and Instagram and others, I wanted to display numbers like 1.2K and 3.8 M instead of 1,222 or 3,823,456. But that's not all! As we all know, there might be some human beings which undoubtely won't like these abbreviations and will try to reverse them. So, 1.2k will become 1,200 and 3.8 M will...
The program should take input the number, the start of the range and the end of the range, and output how many integers the number appears between the start and end of the range, inclusive. Both programs and functions are allowed. Example Inputs For example: //Input example 1 3,1,100 //Input example 2 3 1 100 //Input e...
Given N (2 <= N), print N lines of the letter Fibonacci series like this (i.e. N = 5) First, start with a and b: a b Next, add the two lines. a b ab Keep adding the last two lines. a b ab bab Keep going... a b ab bab abbab And we're done. Remember, this is code-golf, so the code with the fewest bytes wins.
This is my first code golf exercise for you: Your input is two integers n and k. You can assume n >= 1 and k >= 1 You have to output all numbers from 1 to n (inclusively) and replace every element that is a multiple of k or that contains k with "Shaggy". you can take the input in any convenient form and output it in a ...
Write a program or function that draws a mountain range, where each subsequent larger mountain peak is "behind" the ones in front, and alternates which side is visible. This is a mountain range of size 1 /\ This is a mountain range of size 2 /\ /\ \ This is a mountain range of size 3 /\ / /\ / /\ \ This is a mou...
Today you will be doing another palindrome challenge! So, your task today is to take a string, and determine the minimum amount of letters required to insert to turn it into a palindrome. For example, let's take the string fishes. In this, case the best way would be to add h if, so the result would be 3. fishe s h...
You can create a list of all rationals 0 < r ≤ 1 by listing them ordered first by denominator and then by numerator: 1 1 1 2 1 3 1 2 3 4 1 5 1 2 3 4 5 - - - - - - - - - - - - - - - - - 1 2 3 3 4 4 5 5 5 5 6 6 7 7 7 7 7 Note that we skip any rational number that already o...
A binary convolution is described by a number M, and is applied to a number N. For each bit in the binary representation of M, if the bit is set (1), the corresponding bit in the output is given by XORing the two bits adjacent to the corresponding bit in N (wrapping around when necessary). If the bit is not set (0), th...
Write a program that takes two numbers as its input. The first one is the number of dimensions - 0 for a dot, 1 for a straight line, 2 for a circle, 3 for a sphere. The second number is the radius of the object, or, if it's 1-dimensional, the number itself. Output 0 for 0 dimensions. The output is the length/area/volum...
Given the following Python 3 script: def greet(): print("Hello, world!") greet() Prepend some lines to this text file so that it can be both executed as a Python program as well as compiled and run as a C++ program producing the same output Hello, world! (including the newline at the end): $ python3 bilingual.py....
I often forget what I wanted to say when the teacher calls on me to speak. Can you make me a tool to solve this? Requirements: The program must loop as follows: First, take in input If the input is empty, print the last stored question. Otherwise, store the input as a question. Notes: The input will never be empt...
Given a sequences of events with probabilities between 0.0 and 1.0, generate and derive the probability of each combination occurring. You may presume that a sequence of numbers is provided in whatever construct your chosen language provides. Here's an example; you may presume that the length of the sequence's combinat...
...will you help me immortalize it? I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit. It must work with no input arguments. The output should look exa...
A Primenary (binary-prime) string is one which, when written as a binary grid, every row and column has a prime total. That's quite a vague explanation, so let's break it down with a worked example... For this example we'll use the string bunny: First, find the ASCII code point of each character and its binary repre...
Inspired by, and in memory of, my dear friend and colleague, Dan Baronet, 1956 – 2016. R.I.P. He found the shortest possible APL solution to this task: Task Given a Boolean list, count the number of trailing truth values. Example cases {} → 0 {0} → 0 {1} → 1 {0, 1, 1, 0, 0} → 0 {1, 1, 1, 0, 1} → 1 {1, 1, 0, 1, 1} → 2 ...
Your task is to write a program that runs in two different languages, and does the following: In one language, it palindromizes a given string. Take the string. abcde Reverse the string. edcba Remove the first character. dcba Glue it onto the original string. abcdedcba In another language, it depalindromizes a give...
Your task is simple: Write a program (or function) that takes no input and outputs something like this: ## *name*, *length* bytes *code* Where *name* is the name of the language you are using, *length* is the number of bytes in your code, and *code* is your program's source code. If *code* contains multiple lines,...
Introduction to Numerical Mathematics This is the "Hello, World!" of PDEs (Partial Differential Equations). The Laplace or Diffusion Equation appears often in Physics, for example Heat Equation, Deforming, Fluid Dynamics, etc... As real life is 3D but we want to say "Hello, World!" and not sing "99 bottles of beer,..."...
Given a string of text that contains lowercase letters, encode it as follows: (I will be using abcdef) First, encode the alphabet cipher, but this time, 0-indexed. 000102030405 Reverse it. 504030201000 Loop through the string. If the next two digits together are 25 or smaller, encode those two numbers. 5 04 03 02 01...
Find X I was inspired by math questions in which one is asked to "Find X" for a given shape. Originally, I was just going to have the challenge be to print the x and y location of the character 'x' in a String. But I supposed that would be too simple. So I considered the context they were normally in, and decided findi...
Problem Description Imagine you're a turtle on a grid. You're given two numbers f and b, and you're facing east. You perform a march across the grid, counting each of the cells you encounter, according to the following rules: By default, you write the count to the cell you're in, then walk forward. If the count is di...
I got this challenge from Codingame and am curious about better solutions than mine: Given a width via standard input draw a hollow square of '#' in given width and length. Example: 5 results in ##### # # # # # # ##### I used python to solve this so i am particulary interested in other python code. But please fe...
Challenge Given an ASCII operator from the list below and a number n, draw an ASCII representation of the operator using that operator as the character with the line segments of the operator having length n. Input An ASCII character from the list = + - x / and an integer n where n >= 1. (I'm using x instead of * and /...
Cubes can be made of six squares as sides. But you could also fold three 2x1 rectangles in half and glue them together to form a cube. Now in this challenge you get a set of pieces which are each made from squares, and you have to determine whether you can choose pieces to form a unit cube. Not all of the pieces have t...
In my time on PPCG, I've noticed that quine problems and polyglot problems are quite popular. Also, meta-solutions to problems, that is, scripts which generate a program which is the solution to a problem, tend to get a lot of positive feedback from the community. Therefore, I have created this challenge, which impleme...
This problem is about separating a string representing a product identifier into three components. The first part consists of upper and lower letters of arbitrary length which represents the warehouse. The second part is digits which represents the product number. This part is also of arbitrary length. The last par...
Today is November 8th, 2016, Election Day in the United States of America. If you are a U.S. citizen eligible to vote, then go out and vote if you haven't already before answering this challenge. Do not discuss who you voted for. It only matters that you voted. If you are not a U.S. citizen or not eligible to vote, the...
I want a blanket that looks like this. Each strip goes over, under, over, under. Can you print it? \\\\////\\\\////\\\\////\\\\////\\\\////\\\\//// \\//// \\//// \\//// \\//// \\//// \\//// //// //// //// //// //// //// ////\\ ////\\ ////\\ ////\\ ////\\ ////\\ ////\\\\////\\\\////\\\\/...
Challenge I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below: _|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___| ___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__ _|___|___|___|___|___|___|___|___|...
It is only Tuesday, ugh. I deserve a treat. Golf me a Castle. The Least amount of bytes wins! Taken no input and output this image exactly: /\ /\ / \ / \ ---- ---- | |^^^^^^^^^| | ----------------- | _ | | | | | | | | | | | Edit Build me a brick wall! 36 votes...
Your program must take in a string like: test string And must output each character adding one at a time like this: t te tes test test test s test st test str test stri test strin test string notice how spaces count! Good luck! Least Bytes win. ~N
In the alternating Fibonacci sequence, you first start with 1 and 1 as usual. However, instead of always adding the last two values to get the next number, you alternate starting with adding, and every other time you subtract instead. The sequence starts like this: 1 1 2 # 1 + 1 -1 # 1 - 2 1 # 2 + -1 -2 # -1 ...
Let's define a simple 2D language, which we'll give the incredibly original name befinge. Befinge has 5 instructions: <>^v, as in most 2D esolangs, redirect the instruction pointer in their respective directions. . is a no-op. The instruction pointer starts out at the top-left corner going right. If the instruction ...
Given an xxd hexdump such as this one: 00000000: 1f8b 0808 4920 2258 0003 7069 6c6c 6f77 ....I "X..pillow 00000010: 2e74 7874 00d3 d707 8218 10d0 2799 c545 .txt........'..E 00000020: ba96 41a1 994c 7d60 d650 d53c 44a3 8a22 ..A..L}`.P.<D.." 00000030: cd43 34aa 28d2 3c44 a38a 22cd 4334 aa28 .C4.(.<D..".C4.( 00000040:...