All Questions

Filter by
Sorted by
Tagged with
23
votes
24answers
2k views

Make Gimbap cutter

Gimbap(김밥) is Korean food, somewhat looks like sushi roll. Here is Korean emoticon represent Gimbap : @)))))))))) Your quest is make ASCII Gimbap cutter. Rule ...
13
votes
38answers
4k views

ASCII Meme Arrow Generator

Specifications Given a number n, output an ASCII "meme arrow" (greater-than symbol, >) of size ...
0
votes
1answer
155 views

Find 77 7-letter Magic Words [closed]

A magic word is a word whose Braille spelling contains precisely 26 dots (because the Morse code alphabet can be circularly encoded within). For example: ...
6
votes
1answer
189 views

Insert commas into numbers [closed]

Write a program that reads a string, and inserts commas to divide large numbers in groups of 3. i.e. 10000 => 10,000. It should 'fix' incorrectly formatted numbers as described below. It must work ...
2
votes
1answer
115 views

Shortest Gomoku (5 in a row) implementation [closed]

I suspect Gomoku may be one of the simplest games to implement in code. https://en.wikipedia.org/wiki/Gomoku The game is this: players BLACK and WHITE take turns putting down black and white stones. ...
92
votes
12answers
8k views

Proving that a Russian cryptographic standard is too structured

The aim of this challenge is to find an impossibly short implementation of the following function p, in the langage of your choosing. Here is C code implementing it ...
1
vote
1answer
190 views

Implement the EnScript CHS command [closed]

JonoCode9374 had almost completely implemented my language EnScript except for the CHS command. I was impatient of waiting for them to implement this command, so I chose to put this question here. ...
3
votes
0answers
77 views

Generating edge cases in programming puzzles [closed]

Not exactly sure if it belongs in this site, but I always have trouble thinking of all the certain edge cases in any kind of competitive programming or puzzles. For example, take this kind of ...
3
votes
1answer
209 views

Multiplication in the Steenrod Algebra

Here's yet another Steenrod algebra question. Summary of the algorithm: I have a procedure that replaces a list of positive integers with a list of lists of positive integers. You need to repeatedly ...
23
votes
17answers
3k views

Who won a Game of Bar Dice?

Challenge Bar Dice is a simple game played in a Bar with Dice (hence the name). You roll 5 six-sided dice and attempt to make the best hand. Scoring is based on amassing the largest number of ...
1
vote
3answers
271 views

Manhattan Directions Code Golf

This code golf challenge is to show directions through numbers. When the user enters a number, then that means a direction change as follows: ...
16
votes
11answers
1k views

Generate basis elements of the Steenrod algebra

The Steenrod algebra is an important algebra that comes up in algebraic topology. The Steenrod algebra is generated by operators called "Steenrod squares," one exists for each positive integer i. ...
11
votes
6answers
855 views

Group Integers by Originality

Introduction: I collect twisty puzzles. Most twisty puzzles are produced and sold by Chinese companies. Most well-known companies ask permission from puzzle designers to produce their designs and ...
9
votes
1answer
259 views

Self-displaying image [closed]

Background There are self-extracting .ZIP files. Typically they have the extension .EXE (and by executing the file they will be ...
21
votes
21answers
2k views

Overlapping String-Blocks

Challenge: Given a list of multi-line strings, overlap them (in the top-left) and output the result. Example: Input: ["aaaa\naaaa\naaaa\naaaa","bb\nbb\nbb","c"] ...
24
votes
9answers
2k views

Generate a Graeco-Latin square

disclaimer: I'm not aware of any non-bruteforce solutions A Graeco-Latin square is, for two sets of same length \$n\$, a \$n \times n\$ arrangement of cells, each containing a unique (across the ...
1
vote
0answers
86 views

Finding row wise sum of transpose of hv-convex binary matrix [closed]

I'm stuck on a problem involving the Gale-Ryser Theorem. The problem's input gives me the row-wise sum of an hv-convex binary matrix(n*m). ...
29
votes
20answers
3k views

Implement Homestuck's Catenative Doomsday Dice Cascader

Challenge I'm under attack by the larcenous Midnight Crew and I need to summon the Catenative Doomsday Dice Cascader in order to defend myself. Since I'm low on space, I need the code to be as short ...
14
votes
31answers
1k views

Incremental Ranges!

Your task is to, given two positive integers, \$x\$ and \$n\$, return the first \$x\$ numbers in the incremental ranges sequence. The incremental range sequence first generates a range from one to \$...
20
votes
22answers
2k views

Rotated Position of Integers

Challenge: Input: A sorted list of positive integers. Output: The amount of integers which are still at the exact same index, after rotating the digits in each integer its index amount of times ...
31
votes
9answers
3k views

The qvolume of an integer

It is ancient knowledge that every non-negative integer can be rewritten as the sum of four squared integers. For example the number 1 can be expressed as \$0^2+0^2+0^2+1^2\$. Or, in general, for any ...
8
votes
4answers
609 views

Leading and Suffering Numbers

Introduction: In Dutch, the words leading and suffering, being 'leiden' and 'lijden' respectively, are pronounced the same way. One is written with a "short ei", and one with a "long ij", as we ...
7
votes
5answers
2k views

Using the smallest number of bytes of code, write a program that produces this image

Context: Gynvael Coldwind, a famous security researcher, published a contest in his blog post (that is now complete). The goal was similar to the one described here, but with certain restrictions ...
3
votes
5answers
189 views

Is there are exactly one partition, given length of partition and maximum number?

It is Restricted Integer Partitions, but with maximum number. Question Three positive integers are given. First number is number to divide, second number is length of partition, and third number is ...
5
votes
1answer
262 views

Make Plan 9 Cat Turing Complete in as Few Bytes as Possible [closed]

Your task is to modify the original Plan 9 cat tool for UNIX, in order to make it a fully turing complete language interpreter. You may make use of ANSI escape codes and the backspace character (\x08) ...
-2
votes
11answers
207 views

Convert alphanumeric (base-36) sentences into hexadecimal (base-16) sentences

I use "sentence" here loosely to mean "any sequence of words separated by spaces" and "words" to mean "sequences of alphanumeric (hexatrigesimal) characters unseparated by spaces". Conversion is from ...
4
votes
9answers
263 views

Maximum summed sub sequences with no two numbers sharing the same digit [closed]

Suppose there are 5 positive integers in an array or list as 14, 12, 23, 45, 39. 14 and 12 cannot be taken in the subset as 1 is common in both. Similarly {12, 23}, {23, 39}, {14, 45} cannot be ...
14
votes
4answers
370 views

Convert between Korean two-set keyboard and qwerty keyboard

Introduction It is somewhat like DVORAK Keyboard layout , but MUCH harder. Let's talk about the Korean keyboard first. As you can see in Wikipedia, there is a Kor/Eng key to change between Korean ...
-3
votes
10answers
374 views

Point out a string character [closed]

Introduction In many programming languages, within syntax exceptions, it is often pointed out to the programmer exactly which character or line is the culprit. This challenge will be a bit of a ...
30
votes
32answers
3k views

Construct a word ladder

Given a list of at least two words (made only of lowercase letters), construct and display an ASCII ladder of the words by alternating the direction of writing first to the right, then to the left, ...
34
votes
18answers
2k views

Count rotary dial pulses in a phone number (including letters)

In your grandparents' day, dialing a phone number was done with a rotary dial like this: To dial each digit, put your finger in the corresponding hole, pull it over to the finger stop, and release it....
-4
votes
2answers
171 views

Random Cake Bake

Warning: This is a bit lengthy I have decided to build my own random function I call it "Random Cake" This function should get an integer value between 0 and 99999 Ingredients ...
0
votes
3answers
214 views

Havel-to-da-Hakimi [duplicate]

It was a dark and stormy night. Detective Havel and Detective Hakimi arrived at the scene of the crime. Other than the detectives, there were 10 people present. They asked the first person, "out of ...
46
votes
73answers
14k views

Dad jokes are fun

We all know the classic dad joke that goes something like this: Somebody says a sentence to describe their self (e.g. I'm tired or ...
51
votes
14answers
5k views

Gravitational Force Between Numbers

The gravitational force is a force that attracts any two objects with mass. In this challenge our objects will be Numbers and their mass will be their value. To do so, we don't care about the strength ...
8
votes
1answer
202 views

Sliding retrieval

Thanks, Uncle (the story) My slightly mad uncle recently left for the space colonies, and passed his pallet goods business to me. The rectangular warehouse is full of pallets of goods except for the ...
-4
votes
4answers
992 views

Output first \$n\$ digits of \$\pi^{1/\pi}\$

This challenge is to produce the shortest code for the constant \$\pi^{1/\pi}\$. Your code must output the first \$n\$ consecutive digits of \$\pi^{1/\pi}\$, where \$n\$ is given in the input. ...
18
votes
22answers
2k views

To exponential digit growth and beyond!

Challenge Given a base \$1 < b < 10\$ and an index \$t \ge 1\$, output term \$x_t\$, defined as follows: \$x_1 = 11_{10}\$ \$x_{i+1}\$ is obtained by converting \$x_i\$ to base \$b\$ and then ...
6
votes
1answer
544 views

Knights and Knaves and Codes

In this challenge, your bot has landed on an island with the stereotypical knights and knaves. Knights always tell the truth, and knaves always lie. The objective is to find the correct 32 digit ...
18
votes
7answers
2k views

Surface of the 3x3x3 cube as a graph

Your task is to generate a graph with 54 vertices, each corresponds to a facet on a Rubik's cube. There is an edge between two vertices iff the corresponding facets share a side. Rules You may ...
16
votes
37answers
2k views

Split into three!

Given a string, you've to split it into groups of three characters (by padding _ at the end). Related, but still it's different. Sample I/O: ...
24
votes
7answers
811 views

Expand a hexagon

Given an ASCII art hexagon as input, output one whose sides are all one unit longer. ...
20
votes
9answers
1k views

Warped chessboard

This challenge is about building a chessboard in which the square size, instead of being constant across the board, follows a certain non-decreasing sequence, as described below. The board is defined ...
14
votes
6answers
1k views

Save my secrets!

I have so many secrets and nowhere to keep them! The goal is simple: write a program that lets you save a string and have it be protected by a password. The program will take an alias, password and (...
30
votes
43answers
4k views

pwaS eht tirsf dna tasl setterl fo hace dorw

Or, "Swap the first and last letters of each word" Your challenge is to, given a string of alphabetical ASCII characters as well as one other character to use as a delimiter (to separate each word), ...
26
votes
11answers
4k views

Gambler's Fallacy Dice

The gambler's fallacy is a cognitive bias where we mistakenly expect things that have occurred often to be less likely to occur in the future and things that have not occurred in a while to be more ...
-3
votes
12answers
292 views

Convert a number into “bracket” numerals

"Bracket" numerals are a type of 'numerals' I made up once, and thought would be a nice challenge here. Basically, you convert the input number into base 6, and then transliterate the ...
27
votes
27answers
4k views

Parse a C++14 integer literal

According to http://en.cppreference.com/w/cpp/language/integer_literal, integer literals consist of a decimal/hex/octal/binary literal and a optional integer suffix, that is obviously completely ...
18
votes
15answers
2k views

Divisor Rich and Poor Numbers

Introduction In the strange world of integer numbers, divisors are like assets and they use to call "rich" the numbers having more divisors than their reversal, while they call "poor" the ones having ...
20
votes
16answers
3k views

​Cuban​ ​Primes

Given a natural number \$n\$, return the \$n\$-th cuban prime. Cuban Primes A cuban prime is a prime number of the form $$p = \frac{x^3-y^3}{x-y}$$ where \$y>0\$ and \$x = 1+y\$ or \$x = 2+y\$ ...

15 30 50 per page