instruction stringlengths 34 53.1k |
|---|
A demonic number is a positive integer whose decimal representation consists of only 6. The list of demonic numbers starts with 6, 66, 666, 6666.
Given a positive integer, output the nearest demonic number. If there are two, output the bigger one.
Testcases:
n output
1 6
2 6
3 6
6 6
35 6
36 66
37 66
100 66... |
The Task
In this challenge, your task is to write a program, which takes in no input, with as many anagrams that are quine of themselves as possible.
Your score will be the number of anagrams of your program's source code that are valid quines divided by the total number of anagrams possible, i.e. the percentage of the... |
Do you ever look at 3D shapes and think that we have 2 many dimensions. So let's make 3D into 1D! (See what I did there?)
Task
Given a 2D representation of a cube (layout below), flatten it into a single string, based on pointers.
The CUBE
This is the layout of the cube filled with no-ops (,) and pointers at the corner... |
Sometimes, I have lists of constant matrices in my code:
[ [[1, 0],
[0, 1]],
[[1, 0],
[0,-1]],
[[0, 1],
[1, 0]],
[[0,-1],
[1, 0]] ]
That's a terrible use of screen real estate. I'd much rather write them next to each other:
[ [[1, 0], [[1, 0], [[0, 1], [[0,-1],
[0, 1]], [0,-1... |
I recently created a new language called ;# (pronounced "Semicolon Hash") which only has two commands:
; add one to the accumulator
# modulo the accumulator by 127, convert to ASCII character and output without a newline. After this, reset the accumulator to 0. Yes, 127 is correct.
Any other character is ignored. It ha... |
Output an infinite sequence of positive integers, such that, for each element in the sequence, all positive integers that have not yet been output have a positive probability of being chosen, and no value is repeated.
For example, if the first integer is 3, then 3 may not be output again, but all other positive integer... |
Introduction:
You are a worker, who is in charge of managing a set of bridges, connecting a square grid of "nodes":
N - N - N
| | |
N - N - N
| | |
N - N - N
(the grid here is 3 by 3, but they can be larger).
Each of the bridges has a set capacity from 1 to 10, and each of the bridges has a number of cars over... |
Challenge
Find the oxidation states of each of the atoms in a given molecule. These can be output as a list or otherwise.
Rules
The total oxidation state of a molecule will always be zero. The total oxidation state is the sum of the oxidation states of each of the individual atoms in the molecule.
The following atoms h... |
Challenge
Given a number, x where -1 ≤ x ≤ 1, and the integers a and b, where b > a, solve the equation sin(θ) = x for θ, giving all solutions in the range a° ≤ θ ≤ b°.
Rules
x will have a maximum of three decimal places of precision. The output, θ, must also be to three decimal places, no more, no less.
Your output ma... |
Target:
Write a floor() function from scratch.
Manipulating like converting float to string, and cutting all after dot are allowed.
All languages are allowed.
Any usage of built in language functions (like toInteger()) or similar is not allowed, casting operators are not allowed.
So, your task is implement floor() func... |
Challenge
Given a positive integer, determine whether it is a triangular number, and accordingly output one of any two constant, distinct values.
Definition
A triangular number is a number that can be expressed as the sum of consecutive positive integers, starting at 1. They can also be expressed with the formula \$\fr... |
A mad scientist has just created a new species of bacterium! He has decided to name it Noblus Gentlemanus, after observing its behaviour. However, his bacteria have ran out of food, and have declared war, as they are able to harvest other bacterium's corpses for enough food to create copies of themselves. There are ... |
Related to: Make a ;# interpreter
In the above linked challenge the task was to create an interpreter for the esoteric language ;#.
The ;# language
The language has exactly two commands: ; and # (all other characters are ignored by the interpreter):
;: Increment the accumulator
#: Modulo the accumulator by 127, print t... |
The Task
In this challenge, your task is to write some code which outputs one of its anagrams chosen randomly with uniform distribution but it should never output itself.
Elaboration
Given no input, your program should output any one of the anagrams of its source code. Your program should never output its own source a... |
Jarl Olaf lives in a beautiful village, Stackholm. In every year he is thinking about raiding a place to get some golden jewelery, food and programmers woman slaves.
He is a good person but not the brightest one, so you need to help him decide the next target. He has three targets in his mind: Jarl Burg, England and Pa... |
The famous Fibonacci sequence is F(0) = 0; F(1) = 1; F(N+1) = F(N) + F(N-1) (for this challenge we are beginning with 0).
Your challenge: Given n, output the sum of all the dth Fibonacci numbers for all divisors d of the nth Fibonacci number. If you prefer more formal notation,
Input: a positive integer n
Output: the... |
Challenge:
Write a program that produces the following output:
. E .. I ... S .... H
...- V
..- U ..-. F
..--
.- A .-. R .-.. L
.-.-
.-- W .--. P
.--- J
- T -. N -.. D -... B
... |
Introduction
Wardialing was a very interesting way to try to hack people back in the '80s and '90s. When everyone used dial-up, people would dial huge amounts of numbers to search for BBS's, computers, or fax machines. If it was answered by a human or answering machine, it hung up and forgot the number. If it was answe... |
I live in the UK, where it rains. A lot. I also have the unfortunate necessity to need to wear glasses to see, which means that when it rains (as it is now), I can barely see out of them. This challenge is so that you can all experience the same!
Task
Output ASCII art glasses with a drop of water added each second.
Inp... |
;# is a very simple language. It has 2 commands:
; will increment the accumulator
# outputs the accumulator modulo 127, and then resets the accumulator
;$ is also very simple and is very similar (and also does not yet exist). It has 2 commands:
; will increment the accumulator
$ outputs the accumulator modulo 127. H... |
Output this binary sequence of length 1160:
-++-+--++-++-+--+--++-+--+--++-+--++-++-+-++--++-+---+-++-+--+--++++--+--++-+--++-++----++-++-+-++--++-+-+---++-+--++-++-+--++-+--+---+-++-+--++-++-+--+--++-++-+--++-+--+++-+-+----+++-+--+--+++---++-++-+--+--+++--+-+-+--+-+++-++-+--+--++-+--++-++-+--+--++--+++---+++-+---++-+-... |
Poke is a really simple incomplete-information game. It's like "Poker", but simpler. At the start of every round, each player is dealt a hand. To simplify things, a hand is a uniformly distributed random number between 0 and 1. Each player only knows their own hand. The player that wins the round is the one whose hand ... |
Your program is given a string consisting entirely of lowercase letters at STDIN (or closest alternative). The program must then output a truthy or falsey value, depending on whether the input is valid romaji.
Rules:
It must be possible to divide the entire string into a sequence of kana without any leftover characte... |
Your challenge is to take a name (string) as input, like
Albert Einstein
and output:
Einstein, Albert
Pseudocode:
set in to input
set arr to in split by " "
set last to the last element of arr
remove the last element of arr
set out to arr joined with " "
prepend ", " to out
prepend last to out
output out
More test c... |
In Rocket League, there are controls assigned to quick chat. For PC, they are
1, 2, 3, and 4. To use a quick chat, you must press two controls. For example, the first option would be 1, 1.
You will be simulating the Rocket League client. You will be given a non-empty list composed only of four characters of your choosi... |
Because we haven't had enough of these, let's do another weird language!
+ increments the accumulator
- decrements the accumulator
# outputs the character with the codepoint of the accumulator modulo 127, and then resets the accumulator
$ is like # but it doesn't reset the accumulator
% reads a single character of inp... |
A Directed Acyclic Graph (DAG) is a type of graph that has no cycles in it. In other words, if there is a link from node A to node B, there exists no path from B to A (via any nodes).
Challenge
Determine whether the directed graph given as input is acyclic.
Input
A list of lists of integers representing the links betwe... |
Suppose you have two six-sided dice. Roll the pair 100 times, calculating the sum of each pair. Print out the number of times each sum occurred.
If a sum was never rolled, you must include a zero or some way to identify that that particular sum was never rolled.
Example Output:
[3, 3, 9, 11, 15, 15, 11, 15, 7, 8, 3]
... |
Introduction
Sometimes I get bored and there are no new questions on PPCG, so I want you to dig a random question from PPCG's past.
Challenge
Given a user's PPCG ID as input (e.g. my ID is 30525), output the URL of a randomly chosen PPCG question. If the question does not meet the following criteria, you must choose an... |
Introduction
Alice is a 2-d language by Martin Ender which has two different execution modes, cardinal and ordinal. When the instruction pointer passes through a mirror (either / or \), it switches from one mode to the other one.
In this challenge we will focus on ordinal mode, where commands operate on strings and the... |
Contest permanently opened - Updated August 10th 2017
Even though on June 5th 2017 I declared a winner (who will be kept as the best answer) I'll be rnning new bots and updating the results.
June 5th Results
Congratulations user1502040
Since there are no ties, I only show the % of matches won.
Statistician2 - 95.7%
Fit... |
A common year is a year that is not a leap year and where the first and last day of the year are on the same day. A special common year is one that starts on a Monday and so ends on a Monday as well.
Your challenge is to create a program/function that when given a year as input finds the nearest special common year, o... |
Input:
The input will be a string of any characters.
Output:
the output will be an emojified (discord emojis) version of the input string. The way it will work is as so:
Letters: a-z (case insensitive) will become ':regional_indicator_lowercase letter here:'
e.g 'A' will become ':regional_indicator_a:'
Digits: any digi... |
Given 2 non-negative integers as input, output a non-negative integer that cannot be created through any mathematical operators on the 2 inputs.
For example, given inputs 2 and 3, 6, 0, 5, 1, 9, 8, 23, 2 are all invalid outputs.
Operations that must be taken into account are:
Addition (a + b)
Subtraction (a ... |
Given a list or delimited string, output a list or delimited string with the first character of each word one word later.
For this challenge, a "word" consists of only all printable ASCII characters, except the space, newline, and tab character.
For example, take the string "Good afternoon, World!" (space-delimited):
1... |
A Pythagorean Triple is a positive integer solution to the equation:
A Trithagorean triple is a positive integer solution to the equation:
Where Δn finds the nth triangular number. All Trithagorean triples are also solutions to the equation:
Task
Given a positive integer c, output all the pairs of positive integers... |
According to this XKCD comic, there is a formula to determine whether or not the age gap in a relationship is "creepy". This formula is defined as:
(Age/2) + 7
being the minimum age of people you can date.
Therefore a relationship is creepy if either of the people in said relationship are younger than the minimum age ... |
Challenge
Weirdly, this hasn't been done yet: output the current date.
Rules
The date format you should follow is as follows:
YYYY-MM-DD
Where the month and day should be padded by zeroes if they are less than 10.
For example, if the program is run on the 24th May 2017, it should output
2017-05-24
The date can either... |
Klein is a 2D language I have designed that can be embedded on 12 different topological surfaces. A Klein program can be run on different surfaces by changing the command line arguments.
The topology determines where the instruction pointer goes when it goes off the edge of the program. When moving off of the edge th... |
Inspired by: Find an Unrelated Number
Challenge
Given two positive integers as input, output the mathematical operations that can be used on those inputs to generate every number from 1 to n inclusive where n is the smallest prime greater than the sum of the two inputs. If the number cannot be generated using the list... |
Related to: Make a ;# interpreter and Generate ;# code
;# - A Whirlwind Guide
This is a simple language with two commands. Its only data structure is an accumulator, which is initialized to 0.
; Increment the accumulator
# Calculate the value of the accumulator modulo 127, and print the corresponding ASCII character.... |
I'm new to this code-golfing thing and I'm very interested in CJam.
Is there a way to get all the current stack as an array? I think I can do it with something like [1$ 2$...n$] but I would have to get the stack's length and use some kind of iterator (or use a fixed length stack... useless). But is there a way to achie... |
Given a string as input, output a number of whitespace characters (0x0A and 0x20) equal to the length of the string.
For example, given the string Hello, World! your code would need to output exactly 13 whitespace characters and nothing else. These can be any mix of spaces and newlines.
Your code should not output any ... |
Challenge
Given a Youtube playlist, output the number of videos in it.
I/O
The playlist will be given as an URL; for example, https://www.youtube.com/playlist?list=PL_3jnZNPYn7qUatgDYBS5NShkfXoehSRC (this is a playlist a friend sent me to try to get me to listen to K-Pop because she's obsessed with it and I don't like ... |
Inspired by the recent craze over another two character language, ;#
Intro
According to community consensus, acceptable answers on this site must use programming languages that, at minimum:
Can determine if a natural number is prime
Can add two natural numbers together
Can represent a list/tuple of numbers, as well as... |
Introduction
Apparently, this question has been asked here and it unfortunately closed. I thought it was a good idea to try again with it, but done right.
XKCD looks at the how we are trained to use "hard to remember passwords", thinking it's secure, but instead, would take a computer 3 days to crack. On the flip side... |
As a couple of people may have noticed lately, I've largely abandoned development of Braingolf because it's boring and uninspired, and moved on to 2Col which is a little more interesting, and not designed to be a golfing language.
The defining feature of 2Col is that every line of code must be exactly 2 characters long... |
For today's challenge, you must write a program or function that alternates the case of a string. However, you must ignore non-alphabetic characters. This means that every alphabetic character must have a different case than the preceding and following alphabetic character. This is slightly more complex than uppercasin... |
The input will be two five letter words. They don't actually have to be dictionary words, just any five letters each, all lowercase or all uppercase, your choice. Only A-Z will appear in the input words and they will always be 5 characters in length.
Your program is to score them both as though they were poker hands an... |
Task
Write a program or function that, given a string and a list of strings, replaces each occurrence of an element of the string list contained in the string with the next element of the string list.
Example
The string is The cat wore a hat on my doormat so I gave it a pat and the list is ["at","or","oo"], we observe ... |
I cannot believe that this hasn't been done before but I may be wrong. If so, just close as dupe.
This challenge is very similar to Is it truthy or falsy? but, IMO, isn't close enough to be a dupe. That has predefined "falsy" variables that all languages must use, some of which aren't even falsy; this uses your own fal... |
A CSS selector is made up of five elements:
The element type (tag name)
The id of the element
The classes of the element
The attributes of the element
Operators to chain these element selectors
This challenge will only involve the first four--also taking into account operators would make more than one element be gen... |
Given one of the 50 U.S. state names on the left as input, output its two-letter postal code as shown to the right:
Alabama AL
Alaska AK
Arizona AZ
Arkansas AR
California CA
Colorado CO
Connecticut CT
Delaware DE
Florida FL
Georgia GA
Hawaii ... |
Introduction
A while ago a lost SO user posted a question here and its now been deleted but I think it would make a good challenge so here it goes...
Challenge
Write a full program or function that takes two strings and checks whether any permutation of the first string is a sub-string of the second string.
Input
Two s... |
You are to golf a program that will take a filename as input and you must output what color the file is.
The file will have any one of these extensions but your program only needs to support one. Please say which one in your answer.
.jpg
.png
.svg
.gif
.bmp
And now to the classic layout.
Input
A filename with one of ... |
Introduction
Ever heard of Remind? No? Neither did I until about 2 years ago. Basic premise of it is for teachers to send out reminders and communicate with their students. Pretty neat, right? It even allows you send emotes and react to messages! Which I do on a daily basis.
But, one thing about Remind is that the teac... |
In the musical rendition of Les Miserables, a song appears called "Red and Black." Here is part of that song:
Red - the blood of angry men!
Black - the dark of ages past!
Red - a world about to dawn!
Black - the night that ends at last!
Source.
Your task is to turn input into a resounding "Red and Black" anthem.
Inpu... |
Given an unordered collection of positive integers by any reasonable input method, return all of the sub-collections that have an odd number of odd elements (i.e. have an odd total).
This is code-golf so you should aim to minimize the byte count of your program.
Since some languages only have ordered collections (lists... |
I see from this SMBC comic that Zach Weinersmith is offering a generous 14 points to anybody who can find a way of generating the following series:
0, 1, 4, -13, -133, 52, 53, -155
Now, we all know that there are infinite ways of generating any given numeric series, so Zach is clearly just giving those points away. Bu... |
In probability theory, the normal (or Gaussian) distribution is a very common continuous probability distribution. Normal distributions are important in statistics and are often used in the natural and social sciences to represent real-valued random variables whose distributions are not known.
The challenge
Your chal... |
Eyeballing the binary values printed as ovals and sticks is not so easy...
To help with that, you must write a function (or a program) that prints numbers in custom binary representation.
So I want to take a number, say 3 (00000011) and output the bits in user-defined format, for example with space separated pairs:
0... |
Write a program that outputs all possible Tic Tac Toe positions including the corresponding game outcome. Avoid duplicate output of equal positions.
The program takes no input.
Rules:
A position output must consist of 9 characters, using X and O for the taken squares, and an arbitrary non-whitespace character for the ... |
An addition chain is a sequence of integers starting with 1, where every integer other than the initial 1 is a sum of two previous integers.
For instance, here's an addition chain:
[1, 2, 3, 4, 7, 8, 16, 32, 39, 71]
Here are the sums that make it an addition chain:
1 + 1 = 2
1 + 2 = 3
1 + 3 = 4
3 + 4 = 7
1 + 7 = 8
8 +... |
Given a string, reverse it interleavingly. Here's how to do it for abcdefghi and abcdefghij, 0-indexed:
Separate the chars at even indices from the chars at odd indices:a c e g i
b d f h
a c e g i
b d f h j
Reverse the chars at odd indices:a c e g i
h f d b
a c e g i
j h f d b
Interleave into one string again:ahcf... |
Your task is to write a function which outputs a ukulele chord chart in the following format for a given chord symbol. For instance, for input "G7", it must output:
G C E A
---------
| | |#| |
---------
| |#| |#|
---------
| | | | |
---------
| | | | |
---------
| | | | |
---------
It must support all chords of thes... |
We've all seen the signs on motels telling us if there's a vacancy or not:
Typically, these will permanently have the letters of VACANCY lit up, and have the letters of NO lit up if there isn't any room in the motel.
The challenge
The average motel in the U.S. has 200 rooms.
You will write a program/function that take... |
Your task is simple: Write a program that can be run in two languages. It should be a normal quine (prints its own source code) in language 1, and should be an error quine (generates an error message identical to its own source code) in language 2.
This is code-golf, so the shortest valid submission (in bytes) wins.
Ru... |
Definition
In Mathematics, Harmonic Sequence refers to a sequence where
$$a_n = \frac 1 n$$
i.e. the \$n_{th}\$ term of the sequence equals the reciprocal of \$n\$.
Introduction
In this challenge, given a positive integer \$n\$ as input, output the Partial Sum of first \$n\$ terms of the Harmonic Sequence.
Input
Yo... |
'---------'
'-'.repeat(9) // longer!
'------------'
(x='----')+x+x
'-'.repeat(12) // same length
Is there any cleverer way of generating strings of 12 repeated characters in JavaScript?
|
I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P
If you convert Dennis's name to an array of 1s and 0s where each consonant is 1 and each vowel is 0, the array is [1, 0,... |
Given a stream of bits, output the shortest possible Hamming code that encodes it.
The steps to generate the Hamming code are as follows, although your submission does not necessarily have to conform to them as long as it produces identical output. The input 110100101 will be used as an example.
Pad the input with tra... |
Background
As noted in the PPCG challenge Compress a maximal discrepancy-2 sequence – which inspired this challenge – the authors of the paper Computer-Aided Proof of Erdős Discrepancy Properties found a maximal discrepancy-2 sequence, namely
-1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, ... |
A cyclic number is a number of "n" digits that when multiplied by 1, 2, 3,...n, results in the same digits but in a different order.
For example, the number 142,857 is a cyclic number since 142,857 x 2 = 285,714, 142,857 x 3 = 428,571, 142,857 x 4 = 571,428, and so on. Given an integer input, determine if it is a cycli... |
Also known as the [analog root]
(Opposite of the digital root!) ;)
The digital root of a number is the continuous summation of its digits until it is a single digit, for example, the digital root of 89456 is calculated like this:
8 + 9 + 4 + 5 + 6 = 32
3 + 2 = 5
The digital root of 89456 is 5.
Given a digit as input vi... |
Kids who are learning how to count often know runs of numbers, but can't seem to put those runs together properly.
For example, they might say:
1,2,3,4,7,8,9,10
Sometimes kids will realize that they skipped some numbers, and go back:
1,2,3,4,7,8,5,6,7,8,9,10
This is clearly the superior pattern. We need to identify ... |
This is a throwback challenge. You will choose an old computer system and an old language created for that system.
The challenge
Pick an old computer system that was made before the year 2000. In a programming language that was created to run on that system, print said system's logo.
Example systems, their languages, a... |
Challenge
Your program needs to take an input of a string, where the string has only letters, no special characters, no numbers, and no accents (they look all weird).
Then, your program should output a superscript version.
Example
Input: hello world
Output: ʰᵉᶫᶫᵒ ʷᵒʳᶫᵈ
Test Cases
hello - ʰᵉᶫᶫᵒ
code - ᶜᵒᵈᵉ
golf - ᵍᵒᶫᶠ
a... |
The challenge
You're given:
a non-empty, unsorted list h of positive integers (the haystack)
a positive integer n (the needle)
Your task is to return the list of all unique decimal concatenations of permutations of h whose binary representation contains the binary representation of n.
Examples
h = [ 1, 2, 3 ]
n = 65... |
The purpose of the challenge is to approximately plot the attractor of the logistic map as a function of its parameter r (also called bifurcation diagram), or a subregion of it. The appearance of the graph can be seen in the following image from Wikipedia:
Background
The logistic map is a mathematical function that ta... |
Introduction
I don't particularly know where the fizz buzz trend came from. It might just be a meme or something, but it is somewhat popular.
Challenge
Your job today is to convert Fizz Buzz into binary (0, 1) respectively, and convert that binary to text. Pretty standard stuff.
How does that work?
FizzBuzzBuzzFizzBuzz... |
While writing my essay for Shakespeare, I realized that I needed to shorten my quote references to more manageable lengths. I had previously been writing this:
(Act 1, Scene 2, Lines 345-346)
But I've now been told to write them like this:
(I.ii.345-6)
Clearly, I need some golfed code to golf my Shakespeare quote ref... |
Buzzby Berkeley Robot Hokey Pokey
Task
Write a program or function to produce an ASCII art animation depicting a line of robots dancing to the lyrics of the Hokey Pokey (or Cokey, if you prefer) in the style of a Busby Berkeley number!
Example Output
Input
Accepts three arguments (assumed to be valid):
N = number of r... |
Hex triplets such as #ffffff (white) or #3764ef (blueish) are often used to denote RGB colors. They consist of # followed by six hexadecimal digits (0-f), or sometimes three digits where the real color is obtained by doubling each digit. For example, #fff is #ffffff and #1a8 is #11aa88.
Sadly, that three digit shorthan... |
Before I begin, this challenge was not mine originally
Credits to The University of Waterloo. This came from the Canadian Computing Competition 2016, Senior Problem 5. Here is a clickable link to the contest PDF:
http://cemc.uwaterloo.ca/contests/computing/2016/stage%201/seniorEn.pdf
Here is a link to the site:
http://... |
This is a challenge about the the tricks and optimizations that can be used when golfing in CJam. CJam golfers may recognize many of the tricks involved. However, unfamiliar approaches and constructs may be involved, so take a look at the CJam tips as well as the CJam instruction reference if you get stuck. Solutions m... |
Sometimes, while golfing, one needs to represent large number(s) in their code. Writing them as is can significantly increase the byte-count.
What general1 tips do you have for representing long numbers concisely in code?
Please post one tip per answer.
1With general, I mean tips that can be applied to more than a sin... |
My previous challenge, Print invisible text was quite popular, likely due to how trivial it is.
However those more observant of you may have noticed that you're not really printing invisible text, because it's impossible to read what was inputted given only the output.
So I figured how about a real invisible text chall... |
A simple one:
Take a positive integer n less than 1000, and output the integers from 1 to n interleaved with the integers from n to 1. You must concatenate the numbers so that they appear without any delimiters between them.
Test cases:
n = 1
11
n = 4
14233241
n = 26
1262253244235226217208199181017111612151314141315... |
Steven Gerrard was born on 30th of May 1980. He is now 37 years old. Happy birthday, Steven!
To celebrate his anniversary, your goal is to remind him the number of goals he has scored each year in premiere league for Liverpool.
He doesn't want to remember the goals scored before or after playing for Liverpool. It is l... |
Challenge
Hi, given a string as input, remove any salutations found at the start of the string.
The program which performs the most correct substitutions in under 50 bytes wins.
Salutations
Hey, a salutation is defined as one of the following words:
hi
hey
hello
dear
greetings
hai
guys
hii
howdy
hiya
hay
heya
hola
hih... |
Goal: This goal to take a string and output how many contributions should be made on which days in order to display a message.
Specification
Input
Support letters plus space (i.e. [A-Za-z ] )
Space is a blank 3X7
The letters are defined in this 5x7 DOT Matrix font provided below
The size of each letter is the minim... |
For Gregorian calendars, the date format varies from a country to another. There are three main formats recognized:
YY-MM-DD (big-endian)
DD-MM-YY (little-endian)
MM-DD-YY (middle-endian)
Your task is to write a program which, given an input string representing a date, output all the possible date formats by which th... |
Challenge
Given a non-empty string S of length L consisting entirely of printable ASCII chars, output another string of length L that consists entirely of printable ASCII chars, but is not equal to S.
For the purposes of this challenge, a printable ASCII char is one between U+0020 and U+007E, inclusive; that is, from ... |
Overview
In this challenge, you will be given two numbers which are both a small offset larger than a multiple of a medium-size number. You must output a medium-sized number that is almost a divisor of both of the numbers, except for a small offset.
The size of the numbers involved will be parameterized by a difficulty... |
The Straddling Checkerboard is a method for converting letters to numbers and was part of a pencil an paper cipher known as VIC
To convert letters to numbers first you have to make a checkboard like this:
0 1 2 3 4 5 6 7 8 9
---------------------------------------
E T A O N ... |
You must fill an array with every number from 0-n inclusive. No numbers should repeat. However they must be in a random order.
Rules
All standard code-golf rules and standard loopholes are banned
The array must be generated pseudo-randomly. Every possible permutation should have a equal probability.
Input
n in any way ... |
Given a non-negative integer N, output the smallest odd positive integer that is a strong pseudoprime to all of the first N prime bases.
This is OEIS sequence A014233.
Test Cases (one-indexed)
1 2047
2 1373653
3 25326001
4 3215031751
5 2152302898747
6 3474749660383
7 3415500717... |
Everyone knows log scales are for quitters. Therefore, you must write a program or function that de-quitifies a bar graph with a log scale given a base.
The bar graph input is taken as a single string which is a list of bars, where each bar of the log scale bar graph is separated by the printable (or whitespace) delimi... |
Challenge
Write two programs that:
run in two different programming languages.
These may not be two versions of one language.
when one program is run, it outputs the second program, and vice versa.
The two programs must be different (no polyglots).
Here's the catch though:
The programs must be radiation hardened.... |
In this challenge, you must take a string matching the regex ^[a-zA-Z]+$ or whatever is reasonable (you don't have to consider uppercase or lowercase letters if you want) (you may assume the string is long enough, and has the right structure for all the operations), and output another string, produced similarly to word... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.