instruction stringlengths 34 53.1k |
|---|
The printable ASCII characters (hex codes 20 to 7E) in order are:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
(Note that space is in there.)
This string clearly contains all the printable ASCII characters at least once in increasing order when read from left to to ri... |
In this challenge, you will take an input image and crop it to make a square, leaving only the central part of the input image.
The answers must work with landscape, portrait, or square input images. The width of the output image should be equal to the shortest side of the input image e.g. the result of a 200x300 image... |
The recent question about Wang tiles has led me to think that creating Penrose tilings might be an interesting popularity contest.
Background
Wang tiles are tiles that can tile the plane, but only aperiodically (see Fill the Screen with Wang Tiles for a full description). Penrose tiles give the affirmative answer to a ... |
It is simple. I cannot stand when people use spaces when naming files. It sometimes wrecks console commands and makes the output of ls ugly.
The challenge is to write a program (only ascii characters) which
renames all files (including directories) in the current directory to versions with spaces removed or replaced b... |
Conway's Game of Life is (almost) always played on a regular square grid, but it doesn't need to be.
Write a program that implements the standard cell neighboring rules from Conway's Game of Life on a two-dimensional tiling of the Euclidean plane that is not a regular tiling of squares, triangles, or hexagons.
Specific... |
Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest.
Like this (it is dithered photo):
Rules
You are disallowed to use any existing images - you should generate image purely algorithmically
Use only 2 colors - black and white (no grayscale)
Each time program ... |
Intro
In most fonts all of the uppercase alphabet characters besides BDO have single lines approximately touching some of the four corners of the character's bounding rectangle: ACEFGHIJKLMNPQRSTUVWXYZ.
For example, the two legs of an A "touch" the bottom left and bottom right corners of the character. Likewise, C touc... |
After @MartinBüttner achieved exactly 10,000 reputation, we now have three full rows of 10k users on the users page! Now, since we're all programmers here, we like to automate things instead of doing them manually. Your challenge is to write a program to automatically congratulate new 10k users.
Specification
Input
The... |
Task
Write a function that accepts two integers \$a,b\$ that represent the Gaussian integer \$z = a+bi\$ (complex number). The program must return true or false depending on whether \$a+bi\$ is a Gaussian prime or not.
Definition
\$a+bi\$ is a Gaussian prime if and only if it meets one of the following conditions:
\$a... |
Write a program that outputs all 64 layers of this representation of Graham's number from Wikipedia:
Your output must exactly match this ASCII version (in which ^ represents Knuth's up-arrows and combinations of slashes and underscores represent the large horizontal curly brackets):
3^^................................. |
Some numbers such as: 6, 12, 20, 30, 42, 56, 60, 90, 120 and so on as can be expressed as a product of consecutive integer numbers as shown below.
6 = 2 * 3
12 = 3 * 4
30 = 5 * 6
60 = 3 * 4 * 5
90 = 9 * 10
120 = 4 * 5 * 6
Write a program or function that outputs a list of consecutive integers which pro... |
Overview
Given a list of fireworks a-z and times 3-78, arrange them with fuses to make them all light up at the correct time.
A line of input is given as space separated letters and numbers:
a 3 b 6 c 6 d 8 e 9 f 9
That example shows that firework a need to light at time 3, b and c both at 6, d at 8, with e and f both... |
Background
Manufactoria is a game about programming. The player must use a form of two-dimensional programming language to complete tasks. If you've never heard of it, the easiest way to learn is to try out the first few levels of the game.
Challenge
Your challenge is to create a program which tests the primality of a... |
Write a program that takes in a true-color RGB image I, the maximum number of lines to draw L, and the minimum m and maximum M length of each line. Output an image O that looks as much as possible like I and is drawn using L or fewer straight lines, all of which have Euclidean length between m and M.
Each line must be ... |
Picture of me drafting this challenge with my advanced drawing skills.
Background
The Stickman wars happened long ago, when Earth's dominant species was made of nothing but sticks. Historians regret the fact that there were no painters or cameras back then, we could use some pictures of that war in today's history bo... |
Write two rectangular blocks of code, each w characters wide and h characters tall, that implement Conway's Game of Life when arranged in a grid. (w and h may be any positive integers)
For example, the two code blocks might be: (w = 3, h = 2, not actual code)
XX|
--+
and
|
--+
Treat the first block as if it is the ... |
An ant walks along the edges (not faces) of a wireframe cube. Each vertex it encounters presents it with a fork from which two new edges branch off. The ant chooses which way to turn -- left or right. These direction are relative to the ant, who is facing the vertex and is outside the cube. Your goal is to determine, f... |
Create a program that output's itself as a series of punch cards:
Rules:
You can use any programming language.
The output (i.e. punch cards) can be ASCII art.
Each line of code must be able to be punched into a single 80 column x 9 row punch card - i.e. you can only use 80 characters.
To fit in the 9 rows you need to... |
4-Man Standoff
Description
You've somehow found yourself into a four-way standoff. A loaded gun rests in your hands, and some grenades are hooked on your belt.
The objective is to have the most health at the end of a standoff. A standoff is over when at most one person has a positive amount of health.
Each player has ... |
You are given a certain number of cups (n). You are tasked with stacking these cups into a pyramid, with each row having one more cup than the row above it. The number you are given may or may not be able to be perfectly stacked. You must write a function that takes the total number of cups (n), and returns the followi... |
Imagine you are given two lists of numbers which are to be interpreted as points on a circle of circumference 1000. Let us say
circleA = [10, 24, 44, 175, 321, 579, 618, 841, 871, 979]
circleB = [270, 283, 389, 406, 435, 457, 612, 684, 692, 732]
To measure the distance between these two circles we do the following.
F... |
Invert the Format method.
The Format method of the String class (or equivallent, such as sprintf) is available in most languages. It basically takes a "Format" string which may contain placeholders with some extra formatting, and zero or more values to be inserted instead of those placeholders.
Your task is to implemen... |
Inspired by the connection rules from Calvin's Hobbies' question Make me an alphabet tree take a number of lines of letters as input and output the number of distinct connected trees it represents.
Letters connect to diagonally adjacent letters (never horizontally or vertically) and only where such a connection is avai... |
Consider a question written in plain English whose answer involves two reasonably accurate (but potentially clever) words or phrases that can be separated by the word 'and':
Q: What are the two sides of a coin? A: heads and tails
Q: What are the best ways to travel? A: airplane and jetpack
Q: Why is a raven like a wri... |
Intro
Consider the process of taking some positive integer n in some base b and replacing each digit with its representation in the base of the digit to the right.
If the digit to the right is a 0, use base b.
If the digit to the right is a 1, use unary with 0's as tally marks.
If there is no digit to the right (i.e. ... |
Header:
this question has a very close duplicate, but the other question requires a difference between versions of the languages, instead of a difference between different implementation. this means that all answers from the almost-duplicate are invlid here. this is also my first question, so please don't be harsh.
the... |
I'm work on a problem which I set myself for fun, which is to create a python script which prints the even numbers from 0 to 100. The challenge is to make the script as small as possible. This is what I have so far:
for x in range(0, 101):
if (x % 2 == 0):
print x
Currently it is 60 bytes. Can anyone think... |
Let's make an ASCII art clock and calendar that tells us the current month, day of the month, day of the week, hour, minute, and whether it's night or day (but not the year or second).
At any particular time the calendar will look something like this: (it looks better with less line spacing)
__________________________... |
There is a sequence of numbers called the "Look-and-Say Numbers".
Here is an example of the first 5 terms of the sequence, starting at 1 (with spaces added between the digits):
1
1 1
2 1
1 2 1 1
1 1 1 2 2 1
The pattern is simple, once you see it.
The sequence starts with 1. There is one 1, so the next n... |
Write function which solves equation of degree less than or equal to 2 (ax^2 + bx + c = 0).
Input
Function should get 3 parameters - floating point numbers which are coefficients of this equation. Coefficients may be zero (that means function must able to solve bx + c = 0 and c = 0 too).
Coefficients are between -1000 ... |
Introduction
Greetings fellow traders, you have just entered the Stack Exchange stock exchange. Here you will compete to earn the money by buying and selling shares (unfortunately, we only have the single market).
Gameplay
You will need to write a program that buys and sells shares. At the start, the market price is 20... |
Given a sequence of the bases Adenine, Cytosine, Guanine and Thymine (encoded as ACGT), you're to produce an ASCII art representation of a corresponding double strand of DNA.
The strand will extend vertically. The left-hand strand is the one you are given as input. The right-hand strand will be its complement. For thos... |
Given a number, find an expression in words equaling that number, with a length of that number.
Thus, to an input of 15, you might output sixteen minus one, which has fifteen characters (not counting spaces). If multiple solutions exist, print whichever you want. If none exist, print impossible
Use only the operators p... |
Objective: Print all multiples of 32 from 0 to an arbitrary number n.
Rules:
One argument will be given: a single integer from 0 to 231 - 1. This will be n here on out.
The first iteration must be 0, and the last iteration must be n. 0 is to be counted as a multiple of 32.
Each time a multiple is encountered, the mult... |
Write the shortest code to reverse the bit order of a 32-bit integer.
Rules:
Input is assumed to be a valid integer or string equivalent if your language doesn't support numerical values (e.g. Windows Batch).
Output must be a valid integer or string equivalent if your language doesn't support numerical values (e.g. Wi... |
Not restricted to any one programming language.
What I'm saying is you pass 1 to it and it returns Monday, 7 corresponds with sunday and so on.
I've managed a 146 byte statement in Java to do the same.
return (n<1?"invalid":(n<2?"monday":(n<3?"tuesday":(n<4?"wednesday":(n<5?"thursday":(n<6?"friday":(n<7?"saturday":(n<... |
Update: It seems that the original question at math.SE was solved, there should be no 23 pieces solution.
The original problem is stated here over at math.SE
The task is writing a program that fits 22 copies (or perhaps 23) of the following pentacube into a 5x5x5 cube (back and front view).
The pentacube must be place... |
Your challenge: write a "program", for a language of your choice, that causes the compiler/interpreter/runtime to produce error output when compiling/running your program which is identical to your program's source code.
Rules:
Your program may be specific to a particular version or implementation of your language's c... |
Plot: Jimmy is missing; we have to find him. We should split up.
Plot twist: Jimmy is already dead.
But, our cast doesn't know that, so they need to search the whole area anyway. There is an N columns x M rows (1<=M,N<=256) grid of cells,
either marked as "S" for the starting point, "." for open space, or "#" for an o... |
your task is...
Given a string x and a positive integer y, to determine whether there is a positive integer b and an injective mapping from the distinct characters in x to the digits of base b which permit us to interpret x as an integer equal to y.
details:
If there is more than one base which works, you don't have... |
This challenge is similar to Can you Meta Quine?
A quine is a program that produces itself on STDOUT. This challenge is to produce a program A which when run produces a program B on STDOUT. Program B when run produces program A on STDOUT. Programs A and B must be written in (and run in) the same language. The linked qu... |
Task
Write a program to determine the note sounded, along with how many cents out of tune, of a string tuned to a given frequency and pressed down at a given point.
For the sake of simplicity, assume that the frequency of the sound produced and the length of the string to the right of where it is pressed are inversely... |
Write a program that reads a \$n\times n \times n\$ array of binary values which represent an \$n\times n \times n\$ cube, that consists of \$n^3\$ smaller cubes. Each value says whether there is a voxel (small cube) present in the given position or not. The program must output the given array as an ASCII graphic (that... |
Loopy is a puzzle game from the collection of Simon Tatham. The previous link contains a javascript implementation of a Loopy puzzle generator. I suggest everybody who wants to attempt this challenge to solve a couple of puzzles manually to understand how they are supposed to work.
Here are instructions on how to solve... |
This is an additional challenge to the generate Loopy puzzles challenge. You might want to solve this challenge before attempting the harder challenge in the previous link.
The goal of this challenge is to validate the solution to a loopy puzzle. Please take all documentation on what a loopy puzzle is from the previous... |
You are paddling a canoe down a fairly fast whitewater river. Suddenly, your paddles explode, and you find yourself in a dangerous situation hurtling down a river rapid without any paddles. Luckily, you still have your programming skills, so you decide to carve a program on the side of your canoe to help you survive th... |
You are a foreign trader, hoping to make a profit. There are 5 goods people wish to trade: Apricots, Boars, Canaries, Daffodils, and Earwigs. Starting in the winter, you need to decide what to produce. Then, in the fall, you travel and spend your days trading for a profit.
Gameplay
You start the game with 10 of each... |
Scoreboard
Here are the raw scores (i.e. domino counts) for VisualMelon's submission. I'll turn these into the normalised scores described below, when more answers come in. The existing solution can now solve all circuits in the benchmark:
Author Circuit: 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
Inspired by vi.sualize.us
Goal
The input is a grayscale image and the output is a black and white image. The output image consists of just one closed curve (loop) that is not allowed to intersect with itself or touch itself. The width of the line shall be constant throughout the whole image. The challenge here is findi... |
Your challenge is to find the smoothest number over a given range. In other words, find the number whose greatest prime factor is the smallest.
A smooth number is one whose largest prime factor is small. Numbers of this type are useful for the fast Fourier transform algorithm, cryptanalysis, and other applications.
For... |
Write the shortest program possible such that when you combine the first character and every Nth character after it into a new program, the output is N. This must work for N = 1, 2, ..., 16.
Another way to say it is, if you remove all the characters from your program except for the first one and every Nth one after tha... |
After your disastrous canoe ride, you ended up falling off a waterfall at the end of the river rapids. Your canoe exploded, but you managed to survive the explosion. However, your river journey went completely off the map - you have now found yourself lost in the midst of a forest. Luckily, you still have your programm... |
Write a program in the shortest number of bytes possible that will parse any string given to it by input, and output that string with any and all numbers padded with leading zeroes to match the largest number's length.
For example:
Input:
This 104 is an -8 example of 4.518 a string 50.
The generated output should beco... |
Write two functions/programs which take an ASCII code of character (8-bit unsigned integer) and one of them converts char to uppercase and other to lowercase.
That is, they must be equivalent to following functions:
unsigned char toUpper(unsigned char c){
if (c >= 97 && c <= 122) return c - 32;
return c;
}
unsi... |
Your task is to output a representation of the legendary tree of life, Yggdrasil.
You must write a program whose output is exactly that :
/\
/**\
/****\
/******\
... |
I want you to write a program that outputs a trigonometry circle like the one below. I also want you to animate this circle, having the sine line move along the circumference with the other lines move around it. The minimum number of unique frames is 5. Any lower and your entry will not be counted.
The lines you will... |
With a window similar to the one pictured below, you are given a list of strings, which you want to put in alphabetical order.
As shown, you have five operations:
Move up [U] - moves the selected string up one place
Move down [D] - moves the selected string down one place
Move first [F] - moves the selected string t... |
You are a project manager. One day, one of your programmers went insane (not your fault) and took all the expressions in the codebase and added random brackets to them, before quitting on the spot, ranting about your incompetence (also not your fault). This would be an easy fix, however, for some reason you aren't usin... |
Write a Brainfuck interpreter that can interpret multiple Brainfuck programs embedded within the same source. The syntax is the same except that the instructions must be prefixxed with the number/ID of the targetted program. Example:
1st program
+++[->+<]
2nd program
+>++>+++.
Mashup
1+1+1+2+2>1[1-2+2+2>1>1+2+1<2+1... |
The year is 930, and the Gregorian Church is having a problem. They have thousands of pages of chant music, but the problem is that all the sheet music was simply thrown onto a pile instead of having any real organisation system:
Image by user gamerprinter at Cartographers' Guild.
The Church needs to organise all the ... |
Tallying is a simple counting system that works in base 5. There are various different tallying systems used around the world, but the one that is used in most English-speaking countries is perhaps the most simple - count units by marking vertical lines, then for each 5th mark put a horizontal line through the previous... |
I presume you've all heard of the Rosetta Stone, an ancient stone found to have essentially the same passage written on it in three different scripts. This challenge is based upon that: you have to write three versions of the same program in different languages.
The three programs must output the first n iban numbers, ... |
Background
You are all traders for a slightly less than reputable stock firm. You all are part of a group of traders who focus only on one specific stock.
Each hour each trader has a chance to Buy X stocks or Sell X stocks. There are 50 hours per round and 3 rounds per competition. At the end of all of the rounds the t... |
The MMIX architecture is a fairly simple big-endian RISC design. It has a couple of interesting features, one of them is the MXOR instruction, which is what you should implement.
The MXOR instruction interprets its arguments (two 64-bit registers) as two 8×8 matrices of bits and performs a matrix multiplication where e... |
You don't want to pay money for the expensive architectural program, so you decide to roll your own. You decide to use ASCII to design your buildings. Your program will take in a single string formatted in a specific way, and the program will output the building.
Input
Input consists of a single line of characters. It ... |
The Challenge is to write the shortest implementation to find the Longest increasing subsequence .
Example :
Let S be the sequence 1 5 7 1 8 4 3 5 [length of S = 8 ]
We have 1 sub-sequence of length 0 [will consider it increasing]
6 sub-sequences of length 1 {1,5,7,8,4,3}[all of them are considered increasing]
(7*8)/2... |
A bit of an unusual one, but hey, why not? :)
The objective: Write a functioning IRC daemon in your language of choice that provides barebones functionality, in as few characters as possible. As long as it fulfills the criteria below, it does not have to fully comply with the IRC RFCs (this would make the challenge sig... |
Objective
Given input r and n find the first n natural numbers x such that if we rotate the first digit to the last place we obtain x/r.
You may assume that 2 <= r <= 9 and 1 <= n <= 65535.
You may write a program which takes input from stdin or command-line arguments; or you may write a function which takes r and n as... |
The Task
This is quite a simple coding task, all your program has to do is place a point on a canvas (or your alternative in another coding language) and connect it to all the dots already placed. Your program must take in one input, the number of dots that should be placed, and output some sort of display with the do... |
The Symbols vs. The Letters
The ASCII characters have been divided once again! Your sets are The Letters and The Symbols.
The Letters
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
The Symbols
!"#$%&'()*+,-./0123456789:;<=>?@[\]^_`{|}~
The task is to write two programs:
Print each of The Letters exactly once w... |
All bots at the battle arena suddenly got brainfucked and no one can explain why. But who cares as long as they are still able to fight - although Brainfuck is the only language they understand anymore.
It's been a while since the last submission so I'll finally annouce the winner of BrainFuckedBotsForBattling: Congra... |
What you need to do to win this challenge is to write the shortest "timeago" script that outputs the number of decades, years, weeks, days, hours, minutes, and seconds between a given Unix timestamp and the time the script is run.
You must give the time difference in "lowest terms", e.g. 1 week not 7 days, 9 years not ... |
An epicycloid is the curve a point on a circle makes as it rolls around another circle. A cyclogon is the shape a point on a regular polygon makes as it rolls across a plane. An epicyclogon is the curve traced by a point on one regular polygon as it rolls around another.
Write a program that draws an epicyclogon given ... |
You have found the path through the forest and now plan on travelling along it. However, just before you start on your journey, the ground turns into lava.
You manage to scurry up the nearest tree (the trees have inexplicably not burnt up), but now you are faced with a problem: how can you get out of the forest when t... |
Inspired by this example of using d3js, I challenge you to create a canvas (or your language-of-choice equivalent) in which the mouse pointer trails will be displayed, with the following twist:
The Twist
You should not display the trails of where the mouse pointer was, but the "trails" of where it will (might) be in f... |
I've become alarmed with the growing hatred of spaces and this answer has inspired me to make sure Morse code is safe from this insidious removal of whitespace.
So, your task will be to create a program that can successfully translate Morse code with all of the spaces removed.
Rules:
Input will be a string consistin... |
Introduction
Hello! This is my second post, and I decided to do one which is more language specific, since my last one was very much orientated towards mathematical languages, and thus did not leave room for languages like JavaScript or HTML. If there is anyway to make this more clear, or to tidy up a wording problem... |
It's time to face the truth: We will not be here forever, but at least we can write a program that will outlive the human race even if it struggles till the end of time.
Your task is to write a program that has a expected running time greater than the remaining time till the end of the universe.
You may assume that:
T... |
The Challenge
A simple "spy versus spy" challenge.
Write a program with the following specifications:
The program may be written in any language but must not exceed 512 characters (as represented in a code block on this site).
The program must accept 5 signed 32-bit integers as inputs. It can take the form of a functi... |
Create the shortest program that given an input string it outputs the opposite-cased string. For example if I pass the string "HeLlO" the program should output "hElLo".
Of course, neither aggregate functions can be used, nor framework functions like toupper() or tolower(). Any language is welcome.
|
This is my first code golf so please let me know if it's too broad or if I'm missing any information for a good puzzle!
Challenge
In Ontario and possibly other areas of the world, electricity is billed using Time-Of-Use (TOU) pricing, which varies the cost per kilowatt-hour according to when you use power.
Given a date... |
You are given a nonary (base 9) non-negative integer consisting of the digits 0 through 8 as usual. However the number of digits in this number (with no leading zeros) is a prefect square.
Because of this, the number can be arranged in a square grid (with the reading order still preserved).
Example with 1480 (1125 base... |
This is one of several challenges left for the community by Calvin's Hobbies.
Take a "family tree describing" file with lines of the form:
[ID] [mother ID] [father ID] [gender] [full name]
such as this which describes the first family tree at http://en.wikipedia.org/wiki/Cousin:
1 ? ? M Adam
2 ? ? F Agatha
3 ? ? M Bil... |
A Euler Brick is a cuboid where the length of all the edges are integers and all of the diagonals of the faces are integers as well. All sides must also be different.
Your program has to find as many different Euler Bricks where the sides are less than L within the time M (L and M will be defined later).
All of your c... |
Despite your protest, you have been put to work by your boss on a program that takes a single unsigned integer as input and prints the string "prime" if that integer is prime and "not prime" if it isn't. You may choose which language you do this in, as long as the resulting program is short; your boss very much appreci... |
An ***ameoba graph**** is a type of tree whose nodes all have values from 0 to some non-negative integer N, and any particular node with value x < N connects to x+1 distinct nodes with values x+1.
Ameoba graph for N = 3: (Denoted A3)
Note that the 2's are not allowed to share any of the 3's; exactly three 3's must "be... |
Each cell in a life-like cellular automaton only needs one bit to represent it since it can only be alive or dead. That means there are only two colors; pretty boring.
Normal images have 24 bits per pixel (8 in each of R G B). This means in a normal image with pixels as cells you could simulate 24 life-like games at on... |
Given a number N, output/return X so that N+X is a palindrome, where |X| has to be as small as possible.
Palindrome: A number is a palindrome, if its sequence of digits is the same when reading them from left to right as when reading from right to left. 95359 and 6548456 are symmetric, 123 and 2424 are not. Numbers wit... |
Objective
Given a list of three-word passphrases, crack them all. Each time you guess, you will be given a clue in the style of Mastermind, depicting how many characters match the password, and how many are in their correct position. The objective is to minimize the total number of guesses over all test cases.
Passphr... |
Write a named function or program that computes the quaternion product of two quaternions. Use as few bytes as possible.
Quaternions
Quaternions are an extension of the real numbers that further extends the complex numbers. Rather than a single imaginary unit i, quaternions use three imaginary units i,j,k that satisfy ... |
After the last Ludum Dare (LD) game programming contest a friend of mine made a nice mosaic of all the LD game thumbnails:
After searching for my own game I quickly gave up and decided to solve it like a real programmer... by writing code that finds my game thumbnail.
This is the thumbnail of my game:
More examples c... |
This question is from a programming challenge (not DARPA) which has ended. A sheet of paper consists of message, which has been shredded into vertical strips. Given the vertical strips and a dictionary of valid words, the goal is to put together the original message.
The vertical strips contain only one character from... |
Introduction
You're an American spy during the heat of the Cold War and you've managed to intercept a Russian message. Immediately you recognise it as a code stick cipher and wrap it around a pencil. Looking at the paper on the pencil, you don't see anything. Then you try a bigger pencil, and you see it.
Challenge
You ... |
Code Bots
I hate private and protected variables. I just want to access anything and everything!
If you are like me, then this challenge is for you!
Write a bot that works together in harmony with other bots makes other bots do what you want. You are a programmer, and you know how things are supposed to work. Your j... |
BrainFlow
What is BrainFlow?
BrainFlow is an extension of BrainF**k (BFk) with 3 additional commands for added functionality and confusion.
What commands?
In addition to the normal BFk commands, we also have:
^ Jumps to the cell # depending on the value in the cell.
Ex: If we are at cell # 0 with a value of 4, ^ wil... |
Because we can't get enough of esoteric language golfs, can we?
///—pronounced slashes—is a fun little language based on the s/// regex-replacement function of Perl fame. It contains only two special characters, slash / and backslash \. You can find a full article on it at the esolangs wiki, but I will reproduce a desc... |
Let's create a N×N grid of spaces and underscores that can be used to visually determine if a number is prime. (N may be any positive integer.)
This grid has three simple rules:
The nth column contains the repeated pattern of n - 1 underscores followed by one space. This pattern starts at the first row and is stopped,... |
The challenge is to find the maximum number you can get from a list of integer using basic arithmetic operators (addition, substraction, multiplication, unary negation)
Input
A list of integers
Output
The maximum result using every integer in the intput.
The input order doesn't matter, result should be the same.
You do... |
Challenge
A Pixel World is a PNG image where gravitational, electromagnetic, and nuclear forces no longer exist. Special forces known as "pixel forces" are all that remain. We define this force as
Fp->q = a * (p * q) / (r * r) * r̂
F is the pixel force that p exerts on q
a is Adams' constant, defined as a = 4.2 * ... |
Terminals are so boring these days. They used to look like this:
Now they're just bland and dull and black-and-white. I want you to write me a program that will make my terminal all colorful again!
Description
Take this example Ruby code:
Most Linux terminals support these escape sequences (\e stands for the escape ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.