instruction stringlengths 34 53.1k |
|---|
A narcissist program is a program that only accepts its own source code. A bigotous program is a program that only accepts the source code of programs semantically equivalent to itself. A gang member is somewhere in between.
In particular, we will define a gang as set of programs G, which may or may not be in the same ... |
Background
The Hamming weight of an integer is the number of ones in its binary representation. For this challenge, integers are represented with 32 bits, and they are unsigned.
Challenge
Given an integer between 0 and 2^32-1 (non-inclusive), output a different integer within the same range, and also with the same Hamm... |
The naming conventions for games in the Super Mario series is very strange, and don't match up between regions.
| Japanese Name | American Name |
|---------------------|------------------------------------|
| Super Mario Bros. | Super Mario Bros. |
| Super Mario Bros. 2 | S... |
The Challenge
Generate 1 sec of an 8 bit tone sampled at 256 samples per second. The tone will be made up of a number of sine waves. The frequency of each sine wave will be determined from the input data.
These are deep tones, too low for a human to perceive, but I've chosen 8 bit numbers here since it's code-golf.
The... |
Recently, an electrical engineer studying traffic light timings was fined $500 by the state of Oregon for referring to himself as an engineer.
Given a 2 letter string as input, representing a US state, output:
I am not an engineer if the state is Oregon (OR)
I am an engineer if the state is any other US state
What is ... |
Related
Task
Your task is to calculate the new Elo rating (FIDE rating system) for a player after winning, losing or drawing a game of chess.
To calculate the Elo rating two formulas are needed:
R' = R0 + K*(S - E)
E = 1 / (1 + 10 ^ ((R1 - R0) / 400))
where:
R' is the new rating for player0,
R0 is the current rating ... |
Given an ASCII representation of a piece of string, determine its length.
Input
An multi-line ASCII rendering of a piece of string, which runs from top to bottom, with one 'node' (corner) on each line of input. The delimiter may be assumed to be CR, LF, CRLF, or LFCR. Input may be accepted from STDIN, Command Line Argu... |
Concept
Remembering numbers can be difficult. Remembering a word may be easier. In order to memorize big numbers, I created a way to pronounce them in a leetspeak-like way.
Rules
Each digit is first replaced by its corresponding letter:
0 => O
1 => I
2 => R
3 => E
4 => A
5 => S
6 => G
7 => T
8 => B
9 => P
After the re... |
Lets play golf while we golf.
Problem:
Distance to the hole initially is 700m
Each hit to the ball will make it advance to the hole 250-350m, this should be random.
Each hit has a 5% probabilities of going into water, this will make the quantity of hits increase by 1 as a penalty.
When ball is under 250m it will adva... |
Let's imagine we have a finite set of positive integers. This set can be represented as a line of dots where each integer present in the set is filled in like a scantron or punch card. For example the set {1,3,4,6} could be represented as:
*.**.*
* represents a member of our set and . represents an integer that is n... |
When writing code-golf programs, I usually end up using some numeric constants. I always put them in decimal because that's how I think, but I just realized that my language supports other number formats that might let me shorten my code slightly.
Challenge
Given a non-negative integer less than 2^53-1, decide whether ... |
Task
You must write a program in Language A that will output the source code for a program in Language B which will then output the source code for a program in Language C and so on and so forth. The final program must output the x root y where x and y are the inputs e.g. in Python:
print(int(input()) ** (1/int(input()... |
Your task is to take an encrypted string as input, and output the string decrypted, to reveal its hidden message.
The strings, both the input and output, will contain characters from this list of 64 ASCII-characters (note the leading space):
!"#$%&'()*+,-./0123456789:;=?@[\]^_abcdefghijklmnopqrstuvwxyz|~
These charac... |
Are there any functional programming languages designed for code golfing? I know that golfscript and CJam fulfill the same category for stack based, but I couldn't find a functional code golfing language.
|
I love math. But I can't find a single calculator that can multiply correctly. They seem to get everything right except 6*9 (It's the question to life, the universe, and everything! How could they get that wrong?!). So I want you all to write a function for me that can multiply 2 numbers correctly (and 6*9 equals 42 in... |
Recently, someone proposed more stringent limits for Python's default line length:
Clearly, no program should ever use more than 80 characters per line, for a whole host of reasons. First and foremost, for readability and maintainability, it is important to have a solid standard, so we can adjust the width of our text... |
The Challenge:
Draw a rectangle of ASCII boxes: []
The Rules:
Takes a width and a height input
You can assume both of these are numbers
Must produce a string with newline characters, \n
Examples:
2, 2:
[][]
[][]
2, 3:
[][]
[][]
[][]
Fewest Bytes wins.
|
Be sure to see the other challenge, Reverse ASCII character map!
The ASCII charset (American Standard Code for Information Interchange) is the most widely-used character encoding standard. ASCII codes represent text in computers, telecommunications equipment, and other devices.
Challenge
Your challenge is to print a ... |
Challenge:
Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer 1, the second one 2 and so on.
You can not reuse any characters between the programs. So, if the first program is: x==x, then you may not u... |
Many people know what a truth machine in programming is. But is time we kick things up a notch. Introducing, the extended truth machine! An extended truth machine takes two things as input, a integer n and a nonempty string s. It outputs s n times with optional trailing whitespace. However, if n is equal to 0, you must... |
The reverse of an n-bit number is just its n binary digits in reverse order:
001010010 → 010010100
Given a number n, generate all n-bit integers ([0, 2n-1]) in an arbitrary order, with only one restriction: there must be a splitting point such that the reverse of an integer is on the opposite side of the splitting p... |
Introduction
Given a String containing an arithmetic expression, your task is to output a truthy or falsey value based on whether it contains unmatched parentheses.
Input
Your program should take in a String containing an arithmetic expression. It may take input in any way except assuming it to be present in a pre-def... |
Challenge
Given an integer, n, as input where 0 <= n <= 2^10, output the nth even perfect number.
Perfect Numbers
A perfect number is a number, x where the sum of its factors (excluding itself) equals x. For example, 6:
6: 1, 2, 3, 6
And, of course, 1 + 2 + 3 = 6, so 6 is perfect.
If a perfect number, x, is even, x mo... |
Given two numbers n and m, evaluate the infinite power tower:
n^(n+1)^(n+2)^(n+3)^(n+4)^... mod m
Keep in mind that ^ is right-associative. So 2^3^4 = 2^(3^4). Now how can you possibly assign a value to an infinite sequence of right-associative operators?
Define f(n,m,i) as the power tower containing the first i ter... |
Challenge
An ascii string is made 'dank' when exactly one space is inserted between any two consecutive letters and all capital letters are replaced with lowercase ones. In this challenge I would like you to write a program that takes a string (not necessarily 'dank') as input and outputs a 'dank' version of that strin... |
Inspired by a restriction on What do you get when you multiply 6 by 9? (42)
By order of the President, we are no longer permitted to use confusing fake numbers (i.e. numbers other than integers from 0 to 99 inclusive), and are instead to use only real numbers, that is, those that are not fake.
Unfortunately, most maths... |
Consider a binary string S of length n. Indexing from 1, we can compute the Hamming distances between S[1..i+1] and S[n-i..n] for all i in order from 0 to n-1. The Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. For example,
S = 01010... |
Abbreviate that US state! was fun, but we learnt that efficiently abbreviating US state names is hard with the current system. Let's come up with an alternative state code scheme for efficient golfing.
Your task:
Write a function (or program) which, given a valid US state name (only the 50 normal states required), ret... |
There are many magic squares, but there is just one non-trivial magic hexagon, as Dr. James Grime explained, which is the following:
18 17 3
11 1 7 19
9 6 5 2 16
14 8 4 12
15 13 10
As it is done in Hexagony this is easiest written as just one line, by just reading it row by row:
18 17 3 11 1 7 19 9 6 5 2... |
This is the sequel to one of my previous challenges, Three-Three-Three!
Write a program (or function, or snippet) that takes no input and produces an output according to the following four Conditions.
Both the program and the output must be written such that:
At least 16 distinct characters appear (since 16 = 4 × 4)... |
Given a 7-segment display with some segments switched on and some off, find a sequence of digits (0-9), such that after toggling the corresponding segments for each digit, all segments are switched off.
Example
_
_ [3] => | [1] => [OFF]
_ |
Numbers and their corresponding segments:
_ ... |
As a fan of an at most moderately successful footballBE team, towards the end of the season I often wonder whether my favourite team still has any theoretical chance left of becoming champion. Your task in this challenge is to answer that question for me.
Input
You will recieve three inputs: the current table, the lis... |
The other day, my son asked me to build him a staircase using Lego-ish blocks. And I came up with something like this:
Then my kid asked me for a program using the least number of bytes that generated a similar staircase in a computer screen. I am not that good at code-golf, so I need your help. I need a program that:... |
Task
You should write a program that when a button is pressed, it outputs a different sound for each key.
The keys that you will use are:
1!2"34$5%6^78*9(0qQwWeErtTyYuiIoOpPasSdDfgGhHjJklLzZxcCvVbBnm
The notes begin at C and each key above adds one semitone.
Lets make it slightly easier for you though. You can choose ... |
Input
None
Output
52 cards. No duplicates. Cards are represented as their unicode characters, e.g. .
The Unicode codepoints follow the following format:
The first three digits are 1F0.
The next digit is A, B, C, or D for spades, hearts, diamonds, and clubs respectively.
The next digit is 1 through C and E for the vari... |
Your code may not contain the letter "e", but must count the number of "e"s in the inputted string and output that as a number. Bonus points if you use a language that is not a codegolf language and a language that actually uses the letter e (unlike brainfuck) --- not a required criteria.
|
A Ken Thompson virus is a virus that infects your compiler and other programs. Since it infects all your tools, you can not detect it without using tools from before the virus was introduced.
Your will create a prototype for inserting the Ken Thompson virus into code. The goal of this virus will be to allow you to (fak... |
What general tips do you have for golfing in V? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to V (e.g. "remove comments" is not an answer).
Since V is heavily based on vim, most of the tips for golfing vim would apply too. But there are some features in... |
There are 8 Australian states and territories, each with a 2 or 3 letter abbreviation:
ACT: Australian Capital Territory
NSW: New South Wales
NT: Northern Territory
QLD: Queensland
SA: South Australia
TAS: Tasmania
VIC: Victoria
WA: Western Australia
Your task is to write a function/program which takes a valid Austr... |
Break two numbers up into their powers of 2, if they share any, return a falsey value. Otherwise, return a truthy value.
If one input is 0, the answer will always be truthy.
if one input is 255, the answer will be falsey if the other is not 0.
Example
Given 5 and 3
5 = 2⁰ + 2²
3 = 2⁰ + 2¹
Both share 2⁰, return falsey.... |
Break two numbers up into their factorials; if they share any, return a falsey value. Otherwise, return a truthy value. (inspired by this recent question)
In other words, write each input number as the sum of factorials (of positive integers) in the greediest possible way; return a truthy value if no factorial appears ... |
Based on How high can you count? let us give an advantage to the polyglot people.
Challenge:
Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer 1, the second one 2 and so on.
You can not reuse any char... |
Let's say you have a 20-sided die. You start rolling that die and have to roll it a few dozen times before you finally roll all 20 values. You wonder, how many rolls do I need before I get a 50% chance of seeing all 20 values? And how many rolls of an n-sided die do I need to roll before I roll all n sides?
After some... |
Given an input, output that input followed by a newline endlessly.
Input will be a string consisting only of printable ASCII characters (0x20-0x7E) and newlines (0x0A).
If input is length 0, endlessly output newlines.
This is code-golf so fewest bytes in each language wins!
|
Introduction
"Muhuhuhahahah!" The mad scientist laughs. "You're trapped in my own little game!"
In front of you is a deadly pit of snakes, while behind you is a bottomless chasm. There's no way out, you're stuck!
"Two steps in front of you is the snake pit, and two steps behind you is the chasm. But! Before you move, y... |
The xorspace of a set of integers is the set of all integers that can be obtained by combining the starting integers with the usual bitwise xor operator (^). For example, the xorspace of (8, 4) is (0, 4, 8, 12): 0 is 4^4, 12 is 4^8, and no other numbers can be reached. Note that the starting numbers are always included... |
You end up having a lot of very long, boring-looking conditionals in your code:
if flag == 1:
while have != needed:
if type == 7:
These can be transformed into their much more lovable <3 conditionals counterparts:
if abs(flag - 1) + 2 <3:
while 3 - abs(have - needed) <3:
if 2 + abs(type - 7) <3:
Task
Your task is... |
Your task is given an input string of the full/short name of a CS:GO (Counter-Strike: Global Offensive, a computer game) rank return an integer from 1-18 representing the rank number. A higher number means you are a higher rank and so "better" at CS:GO.
Input
A string representing either the full name or short name of ... |
The task is simple, given two IP adresses a and b, output all addresses within that range.
Examples
Example #1:
f(a = 192.168.0.1, b = 192.168.0.4)
192.168.0.1
192.168.0.2
192.168.0.3
192.168.0.4
Example #2 (TIO will truncate this, use a smaller range when testing):
f (a = 123.0.200.0, b = 124.0.0.0)... |
I'm golfing a program to sum two numbers in C++.
Example:
10 3
13
I found out that this problem can be solved in 54 symbols (without spaces and so on) using C++.
My code (63 symbols):
#include <iostream>
main() {
int a, b;
std::cin >> a >> b;
std::cout << a + b;
}
I have no idea how to make my program sho... |
The Language: Oppification
A funny language to speak is created by applying the following process to each word:
Place op after each consonant. So Code becomes Copodope.
Yes, that's it. For the purpose of this challenge, y is always a consonant.
The Challenge: De-oppification
Given an oppified word, return the origina... |
Just take an input in any way and then print it backward (trailing newlines allowed). For example:
Hello World -> dlroW olleH
Hi -> iH
Yes, it is case sensitive. Shortest code wins
|
Your task is to write a program that, given a number n, returns a list of all valid, halting Smallfuck programs of length n, in any order.
Actually, we're using a variation of Smallfuck called F2, which is just Smallfuck with a right-unbounded tape. For the purposes of this challenge, a program that moves left from the... |
A fairly simple challenge: You will receive two inputs, a string and a number (the number may be taken as a string, ie "123" instead of 123)
If the string does not end in a number (ie, it does not match the regex \d$), just append the number to the end of the string.
If the string does end in a number (ie, it matches t... |
Given no input, output the following:
_
| ~-_
| o ~-_
| ~ ~-_
| \~~~~~~
| * \
| \
|~~~~~~~~~~\
Note the backslashes are actually \, which is U+FF3C
Trailing whitespace is allowed, however leading whitespace is not.
This is code-golf so fewest bytes in each language wins!
|
A string is considered to be square if the following conditions are met:
Each line has the same number of characters
The number of characters on each line is equal to the number of lines.
Your task is to write a program or function which determines whether or not a given input string is a square.
You may require inp... |
Given a width and a block of
text containing possible hyphen-
ation points, format it fully-
justified (in monospace).
Fully justified means it is aligned on the left and the right, and is achieved by increasing the spacing between words until each line fits.
Related:
Justify a text by adding spaces
Align the t... |
I remember this was exam question long long long time ago.
There is a file say MyFile.txt, it can be any size and contains aphanumeric only
your task is to revese the words
example : "Go beyond the traditional laptop with Surface Laptop. It's backed by the best of Microsoft, including Windows and Office"
It should be "... |
Your task:
Create a program that encrypts a string with another string using a key, using
the vigenere cipher.
What a vigenere cipher does
Ciphertext: string
Key: keya
| |
v v
string
keyake
|
v
(18)(19)(17)(08)(13)(06)
(10)(04)(24)(00)(10)(04)
|
v
(28)(23)(41)(08)(23)(10)
... |
Minecraft 1.12 will be released tomorrow, so let's celebrate!
Write code that takes in a non-negative integer N which represents the number of items of something in Minecraft. Output it in a way more helpful to players, giving the number of chests, stacks, and items N is equivalent to. Use the format
XcYsZi
where
X i... |
This is very similar to this challenge, "Implode the Box". It was a pretty nice challenge and it didn't get many answers, so I'm going to post a similar challenge (strongly) inspired by it.
ASCII Boxes look like this:
++ +---+ +------+ +---+ +---+
++ | | | | | | | |
... |
Given a non-empty array of positive integers, determine if it is possible to take squares with side lengths specified by each integer, and arrange them in space such that they form a square.
The output can have anything as truthy / falsey values, and the input array may contain duplicates.
For the truthy testcase [3,2,... |
In this question I asked you to guess an anagram quine based on its output. However it looks like we don't have a question asking to golf an anagram quine yet. So your task will be to make the shortest anagram quine that you can.
What is an anagram quine?
An anagram quine is a non empty program that prints an anagram... |
Brainf**k is the most famous esoteric programming language and is the inspiration for hundreds of other esoteric languages. In fact, there are quite a few languages that are so heavily based off of Brainf**k that the only difference is the characters used. Your challenge is to interpret one of these languages.
Brainf**... |
Task
Given two lists of characters, output their Cartesian product, i.e. the list of pairings of each letter from the first list with each letter from the second list.
Example
"123456" and "abcd" give:
[["1","a"],["1","b"],["1","c"],["1","d"],["2","a"],["2","b"],["2","c"],["2","d"],["3","a"],["3","b"],["3","c"],["3","d... |
Background
A rooted tree is an acyclic graph such that there is exactly one path from one node, called the root, to each other node. A node v is called the parent of another node u if and only if the path from the root to u goes through v and there is an edge connecting u and v. If node v is the parent of node u, node ... |
Given no input, your task is to generate the following:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
... |
Challenge
A repdigit is a non-negative integer whose digits are all equal.
Create a function or complete program that takes a single integer as input and outputs a truthy value if the input number is a repdigit in base 10 and falsy value otherwise.
The input is guaranteed to be a positive integer.
You may take and use ... |
Given a positive integer N, output the number of pairs of integers 0 <= a <= b < 2**N such that a*b >= 2**N.
Rules
You may assume that N is less than or equal to the maximum bit width for integers in your language (e.g. for C, N will not exceed 32 or 64, depending on the architecture of the machine). If your language ... |
When I saw this title in the Hot Network Questions I thought it was going to be a PPCG challenge. I was a little disappointed when it was on Mathematica.
So now it is on PPCG:
Challenge
Given an input string, output the ROT13, flipped value. The input will contain characters from the following alphabet: [abcdefghijklmn... |
Challenge
So, um, it seems that, while we have plenty of challenges that work with square numbers or numbers of other shapes, we don't have one that simply asks:
Given an integer n (where n>=0) as input return a truthy value if n is a perfect square or a falsey value if not.
Rules
You may take input by any reasonable... |
Background
Hello golfers! I would like to learn all the programming languages! But I kinda have a short attention span... and copying all the Hello World examples gets boring... but I like fire! ^w^
Challenge
So here is the plan! I want you all to write the smallest code that will compile, print Goodbye Cruel World!, ... |
Definitions
A bijection from a set S to a set T is a function from S to T such that one element in T is mapped by exactly one element in S.
A bijection within a set S is a bijection from S to S.
The natural numbers are the integers which are greater than or equal to 0.
A subset of a set S is a set such that every elem... |
Given a string as input, output one or more variants of the string such that:
No character is in it's original position
No character is adjacent to a character that it was originally adjacent to
You can assume this will always be possible for the given string, and will only contain single case alphabetical characters... |
Your task today is to implement a time limit for getting input, a task I've found rather annoying to achieve in most languages.
You will create a program function which prompts the user for input. Immediatly after the user supplies input, print the message input received and end execution/return. However, if the user w... |
Mayube recently posted Garble that string. However, humans aren't too good at checking whether a string is actually garbled or not. (Actually, that's an understatement, we are really bad at it.) So, let's save some time making test cases, and see if a string is actually garbled.
Input
Two strings, containing only lower... |
Your challenge: Write a function that takes a string s, a character c, and finds the length of the longest run of c in s. The length of the run will be l.
Rules:
If s is of length 0 or c is empty, l should be 0.
If there are no instances of c in s, l should be 0.
Standard loopholes and Standard I/O Rules apply.
No mat... |
Given a non-negative integer, print out an X that is that big. X is the output for input 0, and you will add slashes equal to the input in each direction to extend the X for larger inputs.
Test Cases
0
X
1
\ /
X
/ \
2
\ /
\ /
X
/ \
/ \
...
10
\ /
\ /
\ /
... |
Your job is to create the slowest growing function you can in no more than 100 bytes.
Your program will take as input a nonnegative integer, and output a nonnegative integer. Let's call your program P.
It must meet the these two criterion:
Its source code must be less than or equal to 100 bytes.
For every K, there is ... |
Consider the string 160615051. It can be "triangulated" as such:
1
606
15051
Then, each row is a palindrome. Also note that each side on the perimeter is also a palindrome:
1 | 1 |
6 | 6 |
1 | 1 | 15051
Therefore, this string can be considered to be a fully-palindromic triangle. Don'... |
(related)
Your challenge is to output the highest number you can. You can output as a number or as a string. You must output something that matches the regex ^\d+$, as in only 0-9.
The Twist
Your source code must be:
Same forwards and backwards
3 bytes long
The middle byte must be different from the other two
Exampl... |
This was inspired by a function I recently added to my language Add++. Therefore I will submit an short answer in Add++ but I won't accept it if it wins (it wouldn't be fair)
Don't you hate it when you can multiply numbers but not strings? So you should correct that, right?
You are to write a function or full program... |
You must make a regex that matches everything except itself. For example, PPCG must not match PPCG, but must match everything else, like something, PPC, and PPCG!.
Surrounding slashes are not considered part of the regex in flavors where they are usually part of the syntax. The same is true of all delimiters.
The rege... |
This challenge was inspired by the game Flood.
Challenge
Given a grid of colors, determine the optimal list of moves to take to convert the whole grid to the same color.
First of all, let us say that a pixel is in the "top left chunk" if and only if it is either the top left pixel or it shares an edge with a pixel of t... |
The objective of this programming puzzle is to reproduce the following gif.
Simplification: If you notice the geometric figures don't exactly touch each other. I think it's simpler if you make each vertex to touch the respective edge, and not to go beyond it. I'm not sure though of how this will alter the configuratio... |
The title of Numberphile's newest video, 13532385396179, is a fixed point of the following function \$f\$ on the positive integers:
Let \$n\$ be a positive integer. Write the prime factorization in the usual way, e.g. \$60 = 2^2 \cdot 3 \cdot 5\$, in which the primes are written in increasing order, and exponents of 1... |
Introduction
So my boss is making me do some manual labor...urgh...I have to take a part out a box of parts, process it and put it back in the box. To make this more interesting I try to sort the parts as I do this, as each part has a unique alphanumeric serial number.
Unfortunately, I only have room to have four part... |
Maybe some of you already know this game: you have a collection of jelly beans of different colors. For every color, the bean can have different tastes, some are good and some are bad, and you cannot tell them apart. You have to pick a bean of a given color, and pray you have select a good one.
So, write the shortest p... |
Thanks @NathanMerrill for allowing me to post this! The following is entirely his wording from this sandbox post (deleted):
We define a "Fresh" substring as a substring that is different from any other substring that starts earlier.
For example, if I take the string "abababc" and split it: ["ab","ab","a","bc"], the fi... |
Your challenge is to read a "password" from the keyboard / standard input.
Challenge:
Read a string s invisibly.
For each of the characters in s, print a character c.
In realtime.
Rules:
You must print c in realtime. As soon as the user enters a character you must display c.
c must be constant, i.e. it must be the s... |
The Task
Build a function that takes a string of coins ending with an item index, and generates change as a string of coins using the least amount of coins possible.
The following are the items that can be bought (0-indexed):
[0.45, 0.60, 0.75, 0.95, 1.10, 1.25, 1.40, 1.50, 1.75, 2.00]
The following are the coins that ... |
Your task today will be to take an existing file and append zeros to it until it reaches a certain size.
You must write a program or function which takes the name of a file in the current directory f and a number of bytes b. While maintaining the original content of f, you must write zeroes (null bytes, not ascii 0s) ... |
This task is about compressing and processing a sequence of conditionals.
In the game Keep Talking and Nobody Explodes, a bomb defuser must disarm a bomb with the help of instructions relayed by experts consulting a convoluted Bomb Defusal Manual. This challenge deals with the module "On the Subject of Wires", explain... |
This task is a classic programming task: Implement a regular expression parser. That is, write a program or function which takes a string describing a regular expression and a candidate string, and test whether the complete candidate string matches the regular expression. You may assume that the regular expression pass... |
Task
The task is to write a script that accepts a number from 1 to 20 inclusive. It will then check if the number has a character that is found in every number that was entered before it. If the number has a character in common it will ask for another number. However if the number does not have a character in common wi... |
Your task is to write a program or function which, given two nonzero integers x and y, returns a truthy value if the image at coordinates x east and y north of xkcd's click and drag comic is mostly white and a falsey value otherwise.
Specifications
The image should be retrieved from imgs.xkcd.com/clickdrag/[y]n[x]e.pn... |
A string of characters repeats if it contains two consecutive substrings that are equivalent.
For example, 2034384538452 repeats as it contains 3845 twice, consecutively.
Therefore, your challenge is to decide whether a string contains a repeating substring. You may take the input as a string or an array of characters.... |
Task:
Given two positive integers, generate a random integer between them (inclusive) and then output all its prime factors.
Examples:
Input: Random Number: Output:
1,2 2 [2]
12,46 18 [2,9]
142,17 40 [2,2,2,5]
Scoring:
This is code-golf so the least by... |
I recently listed to the song I'm a Textpert about texting while driving and one particular line in the song inspired this challenge.
I never stoop so low as to text photos / Instead I text the correct combo of ones and zeros
Now obviously, this would be an almost impossible thing to do in ones head and so you should... |
This is not an invitation for you to downvote everything I've posted. Just sayin' ;)
Challenge
Figure out how I can get myself back down to 1 reputation.
Details will follow input format, then followed by output.
Input
Input will consist of the my current reputation, the number of questions I have posted with an accept... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.