instruction stringlengths 34 53.1k |
|---|
The Scenario
Given an input of ASCII lowercase letters and spaces, draw a spiral of characters that traces the original input of characters excluding spaces.
The Rules
1) The characters shall spiral counterclockwise to the left in an outwardly fashion. If a left turn is not possible, then move straight.
Given: abcdefg... |
Objective
Your goal is to make a program that converts an input to its acronym. Your input is guaranteed to have only letters and spaces. The input will have exactly one space between words. You must output the acronym of the input.
Rules
Your code cannot be case-sensitive(e.g. foo and Foo are the same)
Your code must... |
To celebrate Rounded Pi Day, you must take advantage of today's date to make a program that takes in a circle's diameter and outputs its circumference by multiplying the diameter by 3.1416, where 3.1416 must be obtained using today's date.
Input 3
Output 9.4248
etc.
Does not take the date as input. You do not have to ... |
A standard, solved, 3×3×3 Rubik's Cube has 6 differently colored faces, where each face is a 3×3 grid of squares of one color. The white face is opposite the yellow, the red opposite orange, the blue opposite green, and when white points upward, red is to the left of blue:
Imagine an ant sits on the center square of t... |
Note, when I say "negate", I mean replace all ones with zeroes (i.e. a bitwise negation)
The Thue-Morse sequence goes like 01101001
The way you generate it is:
Start by taking 0.
Negate what is left and append it to the end.
So, take 0. Negate it and add that to the end - 01
Then take that and negate it and add that to... |
So, recently, I found myself reformatting my code for Vitsy to using anonymous class instances for commands rather than the normal method approach. For those who don't know, anonymous class instance syntax looks something like this:
...
private abstract static class SomeClass {
public abstract void someMethod();
}
... |
Input
A single string, which contains no whitespace, as a command-line argument.
Output
If the string is not a valid algebraic notation pawn promotion, produce no output and exit. If the string is a valid pawn promotion, convert it to ICCF numeric notation and print the result, followed by a newline.
A valid algebraic ... |
Inspired by this little game.
Challenge
Given as input the initial position of a grid (always 5x5), like this:
-ABCD
-A---
---C-
---BD
--E-E
You need to connect the letters (same letters all together), removing all empty - spaces. The letters will be always A,B,C,D and E.
Every pair of letters must be connected by a s... |
I have not laughed as much from Stack Exchange content as I have from this. I think you all will enjoy this challenge, as it is inspired by what is over there.
You will write a function or program that is code-golf, i.e. it would have to be as short as you can make it.
Given a text, return (both by any means) the text ... |
I am in desperate need of some ear defenders, so I can program in peace. Unfortunately, I don't have ear defenders. But I do have a pair of headphones, a microphone and a microcontroller, so I thought I'd make some noise-cancelling headphones.
However, there is one tiny problem. I can't program in noisy environments! S... |
As part of its compression algorithm, the JPEG standard unrolls a matrix into a vector along antidiagonals of alternating direction:
Your task is to take a matrix (not necessarily square) and return it in unrolled form. As an example:
[1 2 3 4
5 6 7 8
9 1 2 3]
should yield
[1, 2, 5, 9, 6, 3, 4, 7, 1, 2, 8, 3]
Rule... |
As part of its compression algorithm, the JPEG standard unrolls a matrix into a vector along antidiagonals of alternating direction:
Your task is to take the unrolled vector along with the matrix dimensions and reconstruct the corresponding matrix. As an example:
[1, 2, 5, 9, 6, 3, 4, 7, 1, 2, 8, 3], 4, 3
should yiel... |
Today (March 15) is the Ides of March, best known for being the date that Julius Caesar was assassinated.
What's “Ides”? Well, the ancient Romans didn't simply number the days of month from 1 to 31 like we do. Instead, they had a more complex system of counting backwards to the Kalends, Nones, or Ides.
Challenge
Writ... |
What general tips do you have for golfing in Factor? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Factor (e.g. "remove comments" is not an answer).
|
The inspiration for this code golf puzzle is the Bridge and Torch problem, in which d people at the start of a bridge must all cross it in the least amount of time.
The catch is that at most two people can cross at once, otherwise the bridge will crush under their weight, and the group only has access to one torch, whi... |
A repdigit is a natural number that can be written solely by repeating the same digit. For example, 777 is a repdigit, since it's solely composed of the digit 7 repeated three times.
This isn't limited to simply decimal (base 10) numbers, however:
Every Mersenne number (of the form Mn = 2n-1) is a repdigit when writte... |
A room can be made up of connected rectangles, for instance an L-shaped room. Such a room can be described by a list of dimensions describing the size of each rectangle.
Assume you have two input lists. The first contains the width of rectangles stacked vertically over each other. The second contains the height of the... |
Your job will be to write a function or a program, that will take an integer n>0 as input and output a list of the edges of the n-dimensional hypercube. In graph theory an edge is defined as a 2-tuple of vertices (or corners, if you prefer), that are connected.
Example 1
A 1-dimensional hypercube is a line and features... |
There are many ways to generate random words. You can take random syllables from a set, you can use n-tuples, probably neural networks (what can't they do?), alternating between consonants and vowels, etc. The method this challenge is based off of is by far the worst. It uses a Markov chain to generate random words. If... |
The three rows of the qwerty keyboard are qwertyuiop, asdfghjkl and zxcvbnm. Your task is to find the longest word that can be typed using only one row of the keyboard, from a given list of words.
Sample input 1
artist
home
gas
writer
geology
marine
twerp
Output
writer
(Of the given words, only gas, writer and twerp ... |
Inspired by the C-directive #define.
Challenge
Given one phrase with some alias, and one array with each alias text. Output the initial phrase replacing each alias with its respective text.
An alias is defined by one sharp # followed by its index in the array (the index may start at zero or one). Alias can contains ano... |
Details
Write a function or program that, given an array (or list), containing only integers, returns or output an array with all sub-elements reversed. That is, reverse all elements of the deepest array, then the second deepest, etc. The dimensions need not be specified, but the function or program must work for jagge... |
Inspired by this question
Another way to unroll a 2D image into a 1D string is to use an Hilbert Curve.
There are many version of this curve, depending on the number of iterations used while computing it. Below follow example of Hilbert Curves from first order to fifth order.
The way of computing this curve is the fol... |
Introduction
For the ones who never heard of this game before. You are playing a ball which needs to survive as long as possible. This is done by moving to the left or right, going to the holes. Since the map moves upwards, you need to go downwards to survive longer. If you search for images, you probably know which ga... |
Write a program or function that accepts an integer in the range 1..3999 as input and returns the number of line segments required to express that integer in standard Roman numerals (so you would use XL but not VM). Examples:
1 -> 1
4 -> 3
5 -> 2
9 -> 3
10 -> 2
40 -> 4
50 -> 2
90 -> 3
100 -> 1
400... |
Write a program or function that will break ciphers, using as few bytes as possible.
Task
Given an encrypted message and a dictionary as input, output the decrypted message. The messages will be encrypted using a one-to-one character mapping, i.e. two characters can't both map to one, and vice versa. The message will o... |
Write a function that gets as an input a sorted array of positive numbers A, and an additional number n. The Task is to print out all distinct subsets of A, that sum to n.
Example:
Input:
A = [1,2,2,4,4]
n = 9
Output:
[1,2,2,4]
[1,4,4]
Bonus:
-50% if your code doesn't store duplicate subset (the same subset but in d... |
Goal
Sort a list of items ensuring that each item is listed after its specified dependencies.
Input
An array of arrays of integers, where each integer specifies the 0-based or 1-based index of another item that this item must come after. The input may be an array or string or anything else human readable.
For example,... |
Snakes look like this:
>>>v
@ ^ v
^ >>>^ v
^ v
^<<<<<<<<<
The snake can cross over itself as in this case:
@
^
>^>v
^<<
For a crossover to be valid, the characters on either side must be moving the same direction. The case of
@
>^v
^<
can be considered unclear and invalid.
The output is a st... |
Disclaimer: This does not do any justice on the rich topic of elliptic curves. It is simplified a lot. As elliptic curves recently got a lot of media attention in the context of encryption, I wanted to provide some small insight how "calculating" on an elliptic curve actually works.
Introduction
Elliptic curves are set... |
Imagine for a second that you can compose a tree out of dots.
.
...
.....
.......
.........
...........
.............
...............
...
...
This tree is 13 dots tall.
Now imagine for a second that your filesystem looked like these dots. Your task in this challenge is to make a... |
Introduction
Imagine you are on a two dimensional cartesian plane and want to determine your position on it. You know 3 points on that plane and your distance to each of them. While it is always possible to calculate your position from that, doing that in your head is pretty hard. So you decide to write a program for t... |
Write a program or function that
checks if a variable name is valid and
output 1 or True if it is valid,
0.5 if it is valid but starts with an underscore (_),
and 0 or False if it is not valid.
Rules
A variable name in most languages is valid if it begins with an underscore or letter (a – z, A – Z, _) and the rest o... |
I recently read up on graph theory, especially hypercubes and thought about interesting ways to construct paths on them. Here's what I came up with.
As you might know, you can construct an n-dimensional hypercube by taking all n-tuples consisting of 1 and 0 as vertices and connect them, iff they differ in one digit. If... |
A Diagonal Sudoku board is a special case of Latin squares. It has the following properties:
The board is a 9-by-9 matrix
Each row contains the numbers 1-9
Each column contains the numbers 1-9
Each 3-by-3 sub-region contains the numbers 1-9
Both diagonals contains the numbers 1-9
Challenge:
Create a program or functi... |
There is a virus inside a recipient of 5x5. As we know how it propagates its contamination, your mission is to output the last stage of the contamination.
The recipient
It will be representend as a two dimensional array of 5x5:
0 0 0 0 1
0 0 0 0 1
0 0 0 1 1
0 0 1 1 1
0 1 1 1 1
Where 1 means a position where the virus ... |
Background
The parity of a permutation, as defined by wikipedia, is as follows:
The sign or signature of a permutation σ is denoted sgn(σ) and defined as +1 if σ is even and −1 if σ is odd.
The sign of a permutation can be explicitly expressed as
sgn(σ) = (−1)^N(σ)
where N(σ) is the number of inversions in σ.
Alternat... |
This is a code-golf question.
Given integers s and n the task is to output all arrays of length n which take values from -s to s. The only twist is that you must output them in the following order.
The all zeros array of length n.
All arrays of length n with elements from -1 to 1 excluding any array you have outputt... |
Please note that this question is different from this question. This one asks for graphical output, while the other one asks for ascii art.
Objective
Help! Timmy's graphing calculator broke! His calculator cannot graph anymore. However, he has found a way to add new programs and functions to his calculator. Your job is... |
Introduction
Maximum-length sequences, usually known as m-sequences, are binary sequences with some interesting properties (pseudo-noise appeareance, optimal periodic autocorrelation) which make them suitable for many applications in telecommunications, such as spread-spectrum transmission, measurement of impulse respo... |
Take a 2D region of space divided into axis aligned unit square elements with their centers aligned at integer intervals. An edge is said to be internal if it is shared by two elements, otherwise it is an external edge.
Your goal is to find the minimum number of neighboring elements which must be traversed to reach an ... |
Your program must contain all your language's keywords. Ideally, you should have each one exactly once (see Scoring). Of course, this means your language must actually have keywords, so esoteric languages are probably excluded, but just in case...
Any language used must have a dedicated Wikipedia article created more ... |
Suppose we use the following rules to pull a single string from another string, one containing only ASCII printable characters and called an *-string. If the string runs out before the process halts, that is an error, and the result of the process is undefined in that case:
Start with d=1, s=""
Whenever you encounter ... |
You must write a program or function that sorts a nested list. Here are the rules for sorting a nested list:
Let's take this list as an example:
((5, 2), 2, 7, (2, 1, (3, 4)), 9)
Each element in this list has a "priority". An element counts as a number or a sublist. First, get the priority of each element at the same ... |
Write a function that when given a buffer b (1 - 104857600 bytes long) and a number of bits n (1 <= n <= 64), splits the buffer into chunks of n bits. Right-pad the last chunk with 0s up to n bits.
e.g.
Given the buffer b = "f0oBaR" or equivalently [102,48,111,66,97,82] and n = 5, return
[12, 24, 24, 6, 30, 16, 19, 1, ... |
The Secretary Problem is a famous problem described as thus:
You need a new secretary
You have N applicants that you can interview one at a time
You are able to score each applicant after the interview. Your scoring system will never give two applicants the same score
After you interview an applicant, you must give a... |
This is a code-golf question.
Input
A list of non-negative integers in whatever format is the most convenient.
Output
The same list in sorted order in whatever format is the most convenient.
Restriction
Your code must run in O(n log n) time in the worst case where nis the number of integers in the input. This means t... |
Full width text is text that has a space after every character, including the last one. For instance, the first sentence of this question becomes:
F u l l w i d t h t e x t i s t e x t t h a t h a s a s p a c e a f t e r e v e r y c h a r a c t e r , i n c l u d i n g t h e l a s t o n e .... |
Introduction
Most code-golfers here add explanations to their submissions, so it's easier to understand what's going on. Usually the codelines go on the left and the corresponding explanation to the right with some kind of separator. To make it look pretty, the separators are all on the same column. Also long explanati... |
Gaussian integers are complex numbers of the form a+bi where a and b are both integers. In base -1+i, all Gaussian integers can be uniquely represented using the digits 0 and 1, without the need for a symbol to denote sign.
For instance, 1100 in base -1+i represents the decimal number 2, since
1*(-1+i)^3 + 1*(-1+i)^2 +... |
Given a positive integer \$n\$ output the integers \$a\$ and \$b\$ (forming reduced fraction \$a/b\$) such that:
$$\frac a b = \prod ^n _{k=1} \frac {p^2_k - 1} {p^2_k + 1}$$
Where \$p_k\$ is the \$k\$ th prime number (with \$p_1 = 2\$).
Examples:
1 -> 3, 5
2 -> 12, 25
3 -> 144, 325
4 -> 3456, 8125
5 -> 41472... |
When I was a child, I used to play this game a lot.
Rules
There are two players (let's call them A and B), and each player uses his hands as guns. There are three possible moves:
Hands up to load ammunition to your gun.
Each gun starts empty. Loading increases the ammunition by one.
Hands pointing to the other player... |
In music theory, an interval is the difference between two pitches. Each pitch is defined by the number of half-steps (The difference between C and C#) or whole steps (The difference between C and D). One whole step is the same as two half-steps. Here is a list of all the default intervals and the number of half-steps... |
This challenge but with a better spec.
Spec
Your program will take a linear equation containing a single variable x and output the value of x.
Input / Parsing
The input will only contain numbers, operators, parenthesis (()), x, and an = sign (this means no whitespace).
Parenthesis will always be balanced.
There will a... |
Given a matrix A, we can say that it is "sorted" if each row and column of A is sorted (ascending left-to-right for rows and top-to-bottom for columns). Thus, this matrix is sorted:
[ 1 2 3 4 5 ]
[ 2 2 3 4 5 ]
[ 3 3 3 4 5 ]
[ 4 4 4 4 5 ]
[ 5 5 5 5 5 ]
However, this matrix is not sorted:
[ 1 2 3 4 5 ]
[ 2 1 3 4 5 ]
[ 3... |
Introduction
In the wake of the left-pad npm package fallout, let's have a code golf for implementing left-pad.
The left-pad function consists of 2 default arguments and 1 additional argument, in the form string, length, (padchar). If the padchar is not given, this is standardized to a space character. Let's take an ex... |
Today is Purim on which one custom is to give out triangle-shaped cookies with filling called hamantaschen (singular: hamantasch). Another custom is to drink heavily.
I'm not the most perfect baker.... I have so many irregularly-sized hamantaschen to give out and so many friends to give them to! If I sent you a pictur... |
Draw the following in the fewest bytes possible:
-------------------------
| | ABC | DEF |
| 1 | 2 | 3 |
-------------------------
| GHI | JKL | MNO |
| 4 | 5 | 6 |
-------------------------
| PQRS | TUV | WXYZ |
| 7 | 8 | 9 |
-------------------------
| | ... |
I was answering one challenge here and this task was part of the challenge. I've got a 73 bytes solution in javascript. But I think it is too much for a simple thing.
Challenge
Given as input two integers:
N the length of the expected array
R the interval's range starting in one: 1..R, not 0..R-1
Output in each run o... |
The Challenge
Given 3 numbers X, Y and Z in base B, find a Base in which the addition of X and Y yields Z. The inputs x = 20, Y = 12 and Z = 32 could yield 5 because 20 + 12 = 32 in base 5.
You may assume that there will always be a base in which the addition is correct (there are cases where no base exists, thanks t... |
Introduction
Let's define a ternary function as a function from the three-element set S = {0,1,2} to itself: it associates to each element of S another element of S.
One example of a ternary function f is
f(0) = 0; f(1) = 2; f(2) = 0
There are exactly 27 different ternary functions, and we represent them with integers... |
In honor of recent news of Google developing a keyboard for iPhone...
Your input (for simplicity, all input is case sensitive):
Location of standard dictionary file. File format is 1 valid word per line; in alphabetical order. Example file:
apple
banana
citrus
domino
durian
orange
tuna
zabc
Location of personal dicti... |
Challenge
Given the roots of a polynomial separated by spaces as input, output the expanded form of the polynomial.
For example, the input
1 2
represents this equation:
(x-1)(x-2)
And should output:
x^2-3x+2
The exact format of output is not important, it can be:
1x^2+-3x^1+2x^0
or:
0 0 0
1x^3+0x^2+0x^1+0
or:
3 14... |
At some point, I bumped into an SO question asking how to implement Perl's trivial hash-of-hashes data structure in Java.
For those who don't know Perl, the hash value can be a scalar or another hash, or technically speaking hash reference. Arbitrary depth. Additional feature offered by Perl is autovivification - assi... |
You have to take a base-10 number (e.g. 735) and another number for the base to convert to, and convert the base-10 number into the equivalent number in the other base.
Rules:
You aren't allowed to use any conversion functions built into your language
This is code-golf, the shortest answer in bytes wins!
|
This used to be an old Computer Olympiad Question, not sure what the actual source was.
Assume function f:
f(1) = 1
This f(1), f(2), f(3), f(4), ... sequence of numbers are in ascending order.
Number n has been repeated f(n) times
Here is the sequence up to the fifteenth number:
n : 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
The Challenge:
Just as the title says, your challenge is to use the printable ASCII characters to create a program that prints out a random polygon in the terminal based on the number of sides, n provided by the user, where n is an integer in the range 3 -> 10 including 3 and 10, in as few bytes as possible.
For exampl... |
Here is the 3rd ABACABA city:
_
A|_|
B|__|
A|_|_
C|___|
A|_|
B|__|
A|_|
It is made out of the ABACABA sequence, which is basically:
A (1st iteration)
place B - AB
repeat A - ABA (2nd iteration)
Place C - ABAC
Repeat ABA - ABACABA (3rd iteration)
and you get the idea.
The buildings have a height (corresponded by no... |
Two distinct vertices in a directed graph are strongly connected if there is path in the graph from each to the other. A strongly connected component of the graph is a subset of the graph such that each pair of distinct vertices in the subset are strongly connected, and adding any more vertices to the subset would brea... |
Write a full program with a source code of 256 bytes or less that looks at an image of a flag and determines what country that flag is from. A zip file containing the 196 different flags in the challenge can be downloaded from here. Source: [Flagpedia]. These 196 flag images are the only inputs your program has to hand... |
Your task is to print the following ASCII Art:
_ _ _______ _
| | | | (_______) _ | |
| |__ | | ____ ____ ____ _ _ _____ ____ ___| |_ ____ ____| |
| __)| |/ _ | _ \| _ \| | | | | ___) / _ |/___)... |
In this challenge, you need to partition a list, where partitions have a max size, a min size, and a preferred size. I'll be using the notation (min,pref,max) to indicate the sizes in this challenge.
For those unfamiliar with partitioning, the following list has been partitioned into parts of 3:
[0..9] -> [[0,1,2],[3... |
The Challenge
Given an arbitrary amount of rectangles, output the total count of intersections of those when drawn in a 2D plane.
An intersection here is defined as a point P which is crossed by two lines which are orthogonal to each other and are both not ending in P.
Example
Each rectangle here is denoted by a 2-tupl... |
Everyone realizes that Tic Tac Toe is a solved game. However, the Misère version of only-Xs provides an interesting alternative.
In this version of the game, both players play Xs onto the board and try to avoid making three in a row. If you'd like to see more about this, Numberphile has a nice video about this concept.... |
Write a program or function that listens for incoming TCP traffic on port N. It offers a simple service: it calculates sum of IP address fields of incoming connection and returns.
Program or function reads integer N from arguments or stdin. It listens to incoming TCP connections on port N. When someone connects to that... |
Some of you may have heard of the Wargame series of computer based real time strategy game. These games pit teams of players with primarily cold war era units to see how a hot cold war would have played out. The goal of this challenge is to simulate a tank battle in these games.
Input
Two "tanks" (one red and one bl... |
Background
Consider a round-robin tournament, in which each contestant plays one game against every other contestant.
There are no draws, so every game has a winner and a loser.
A contestant A is a king of the tournament, if for every other contestant B, either A beat B, or A beat another contestant C who in turn beat ... |
The story
"2016? Al..right," grumbled toy seller Hilbert. He opened his eyes, wiped salad dressing trickling out of his ear and ate a morning kick-start cremeschnitte. Exemplar holidays. He needs to go to work now though, and finish the year's accounting.
Christmas is a very yielding period of the year, especially for... |
Create program or function that takes file name as an argument or reads it from standard input, and completes the following task:
Read image from a png file (name given as argument).
Reverse colors in that image, so that for example dark green (0, 75, 30) would become (255, 180, 225) (because 255-0=255, 255-75=180 and... |
I recently saw this question on stackoverflow. It's a great question, but there's one fatal problem with the question. They are asking for the best way to do it. E.g, easiest to read, most idiomatic, neatest etc. Don't they know that isn't what matters? You're supposed to ask about how to do it with the fewest bytes of... |
Alice and Bob are playing a little game. First, they draw a tree from a root node (indicated by a thick dot), with no internal nodes, with numbers at the leaves. Any node may have any number of children.
We start at the root, and first to play is Alice (A). She must select one of the current node's children. Then it's... |
Background
You awake to find yourself lost in a one dimensional labyrinth! A mystical genie (or something) appears and explains that the exit lies in front of you, but that between you and the exit is a series of challenges. As you wander forward you realize that all of the so-called challenges are merely locked doors.... |
This is a little codegolf challenge from codingame.com. I was wondering how much Python3 code is necessary (but of course answers are not limited to Python3).
Input
The first line contains one positive integer n. The second line contains n positive integers. Each consecutive integers on the second line are separated by... |
Your challenge is to passwordify the string! What is passwordifying, you ask?
Take a string as input. This string will only contain uppercase letters, lowercase letters, digits, and spaces.
You must replace all spaces with underscores and move all numbers to the end of the string in the order that they appear from lef... |
If you don't know already, a quaternion is basically a 4-part number. For the purposes of this challenge, it has a real component and three imaginary components. The imaginary components are represented by the suffix i, j, k. For example, 1-2i+3j-4k is a quaternion with 1 being the real component and -2, 3, and -4 bein... |
Explanation
Befunge is a two-dimensional program that uses stacks.
That means, to do 5 + 6, you write 56+, meaning:
56+
5 push 5 into stack
6 push 6 into stack
+ pop the first two items in the stack and add them up, and push the result into stack
(to those of you who do not know stacks, "push" just means add ... |
You are in a one-floor dungeon. There is a treasure which is protected by locked doors. Doors can be opened by finding the corresponding keys. Your goal is to find the shortest path to the treasure.
Input
Input will be a two-dimensional grid representing the initial layout of the dungeon.
###########
#$ # g#
# #... |
Your job is to open a browser window of the default browser to http://codegolf.stackexchange.com.
Your code must open the browser itself, and cannot rely on an open one.
This is code-golf, so the shortest answer in bytes wins.
Moderator note: A large number of answers to this challenge use the URLs http://ppcg.lol or... |
You are an explorer, mapping an unknown world. Your ship is carried on the wind. Where it goes, who knows?
Each day, in your spyglass, you see features to the north, south, east and west. You always see four such features, corresponding to the cardinal directions. Your spyglass reports ASCII symbols like this:
~~.*, ~... |
As per Luke's request and Peter Taylor's addition to this challenge.
Introduction
Everyone knows the game tic-tac-toe, but in this challenge, we are going to introduce a little twist. We are only going to use crosses. The first person who places three crosses in a row loses. An interesting fact is that the maximum amou... |
The Challenge
Everybody loves genetics, right? In this challenge, you will be given the genotypes of two parents. You must find each possible genotype of a child produced by the parents. You must account for dominant and recessive alleles as well as incomplete dominance and codominance.
An example input for the parents... |
Since I am INSANELY hyped for the Final Fantasy XV Uncovered event, I want you to write me a program to tell me when it is!!!
The input
Your take input in the form of HH:MM XDT, where HH is a number in the range 1-12, MM is a number between 0-60, and XDT is a time zone, with X being one of E (eastern, UTC-4), C (centra... |
An arborally satisfied point set is a 2D set of points such that, for any axis-aligned rectangle that can be formed using two points in the set as opposite corners, that rectangle contains or touches at least one other point. Here is an equivalent definition from Wikipedia:
A point set is said to be arborally satisfi... |
Your Task: Print "Hello, World!" using a palindrome.
Simple, right?
Nope.
You have one restriction: you may not use comments.
"Comments" include
Normal // or # comments
Adding extraneous characters to a string literal
Triple-quoted string comments
Creating a string literal to hide characters
You may not use a pre-de... |
The challenge is simple: Determine the type of an input, and output an identifier telling what type it is.
"UI", Unsigned integer: 0, 1,34, 111111111111111111111111111111111111111111
"SI", Signed integer: +0, +1, +42, -1, -3, -111111111111111111111111111111111111111111
"UD", Unsigned decimal: 0.0, 1.23, 1234.1234
"SD... |
This post would make more sense if it were Friday the 13th today... But oh well.
Write a full program that, given any year as the input from at least -10,000 to 10,000, prints all dates of that year that are Friday and also on the 13th of the month.
Output can be expressed as MM/dd, dd/MM, dd.MM, or any other readable ... |
Write a program that accepts input (through stdin) as a string of unary numbers delimited by spaces, and prints the equivalent string of numbers in binary, decimal, and hexadecimal. These unary symbols are allowed:
stroke, '/' or '\'
Decimal 1
ASCII 'I'
ASCII '-'
Your program does not have to support all symbols, but... |
"Hey Bob, I need a new acronym. Something better than 'Automated Support System'. I need you to fabricate me an acronym!"
"Sure thing Joe! I'd love to fabricate an elaborate way to renovate, and not replicate something that you can tolerate."
"Alright Bob, make sure it can separate itself from the old acronym we need t... |
I'm new to this stackexchange, but I must say I am very impressed by the knowledge of some here, and the original codegolf answers for some questions.
I'm not even sure if the following is possible, since my programming language knowledge is very limited, but it sounds like a pretty interesting challenge:
Goal:
Output ... |
In this code-challenge you will write a hash function in 140 bytes1 or less of source code. The hash function must take an ASCII string as input, and return a 24-bit unsigned integer ([0, 224-1]) as output.
Your hash function will be evaluated for every word in this large British English dictionary2. Your score is the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.