All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

Reverse All Characters in a Word [duplicate]

Here's a quickie, just flip the position of all letter like this: "Hello World!" ==> "!dlroW elloH"
-1
votes
8answers
163 views

or iinterpreter [duplicate]

or is a dubious esoteric programming language. The author is unknown but it is known that fungot (a chatbot) is currently learning or but it remains unknown how it does it and where it receives the ...
9
votes
5answers
421 views

Write a bot to play Grid Game

This is the Grid Game: It's a game based on cellular automata, where the aim is to remove all of the pieces belonging to your opponent. How it works: There are two kinds of piece in the game, ...
-3
votes
0answers
49 views

How to print all the lines in a file, when ever pattern matches between to values [on hold]

I am looking for a code which would print below output from the attached file i.e. search between to Patterns SELECT and ;, where the pattern search should start from the line which is started from ...
-1
votes
2answers
196 views

KILL ALIENS NOW! [on hold]

The world has been invaded by aliens. They are everywhere killing people and taking over the world. You are hiding with your friend. They have one weakness - the high pitched sounds. You can't go ...
15
votes
37answers
3k views

Hell0 W0rld! scored by ASCII values

Write a program that outputs Hell0 W0rld!. It must match this output exactly, including capitalization, zeroes instead of o's, exactly one space, etc. Trailing ...
-5
votes
0answers
70 views

Mitrix Addition challenge [on hold]

Here is what I want. To Find the value of each alphabet letter with following Assumptions: A+B=2 A+N=378 N-M=144 J<2*I Z=121393 After that, write a function that accepts two square matrices (...
26
votes
60answers
5k views

Create a program that prints the amount of characters it has, in words

Create a program which prints the amount of characters its source has in English words. If your program is nine letters long it should print "nine". Capitalization is ignored: in case you're ...
9
votes
3answers
353 views

How wavy is an array?

A wave of power \$k\$ is an infinite array that looks like \$1,2,\dots,k,k-1,\dots,1,\dots,k,\dots,1,\dots\$, and so on. For example, a wave of power 3 starts with \$1,2,3,2,1,2,3,2,1,...\$, and ...
14
votes
7answers
779 views

Surjection from one string to two strings

This is the inverse of negative seven's question. Write a program or function which, given any single, possibly-empty string of printable ASCII (codes \$[32,126]\$) outputs or returns two strings of ...
10
votes
8answers
293 views

Output integer given a digital clock style input

Input _ _ _ _ _ _ _ _ | _| _||_||_ |_ ||_||_|| | ||_ _| | _||_| ||_| _||_| output 1234567890 Rules ...
7
votes
1answer
134 views

L tromino tiling

Inspired by this challenge from puzzling.SE. Polyominoes are fun - you can fill all sorts of shapes with them. But as soon as you have limits on what polyominoes you can use, you sadly start running ...
0
votes
2answers
173 views

Mirror, Mirror, on the wall. Who's the fairest of them all?

Well, you know it's Snow White, and the evil Queen is at it again. Will Snow White be saved? Will she fall asleep once again? Will the Prince find her? Challenge: Given an arbitrary number (>= 2) of ...
9
votes
1answer
273 views

Reconstruct the ASCII art from a string

I have a bunch of ASCII art that I have recovered from a failed hard drive. Unfortunately, all of the newlines were stripped out, and I don't know the resolution of the original artwork. I do know ...
12
votes
8answers
1k views

Letters associated with prime numbers

If we assign each letter a respective integer, starting from 1, then a is 1, b is 2, c is 3, and so on. After z, the letters loop back around, but with a in front (aa, ab, ac). It then goes to ba, bb, ...
14
votes
15answers
1k views

Plain Hunt Bell-Ringing

Your task is to create a plain hunt (a bell ringing pattern) with n bells. An example with 6 bells: ...
24
votes
33answers
5k views

Make a haystack (with a needle)

(Essentially the inverse of Find the needle in the haystack) Given two tuples, (w, h) and (x, y), generate a haystack composed ...
22
votes
9answers
3k views

Rational Number RNG

The Objective Build a random number generator whose range is \$\left[0,1\right) \cap \mathbb{Q} .\$ This is, build a random number generator that can produce any value that's: at least \$0 \,;\$ ...
1
vote
15answers
330 views

type in a random mess of capital letters [duplicate]

SOMe PEOPle lIkE tO TYpE iN A LoGiCAL MAnNER, WITh CapITals aT tHe bEGiNnIng Of ThE SENtENCE and smaLl LETTErS EVeRYWHErE eLsE. NOT Us. NOt Us. Your joB iS to tAkE A SenTEncE Of A LL SMAlL LeTTeRS, ...
-7
votes
1answer
245 views

Don't get banned from stack exchange! [closed]

I'm sure this is going to spark some controversy, but let's do a practical demonstration. The objective of this is simple, using the new code of conduct and no input, print out my pronouns ( "he/him"...
1
vote
1answer
204 views

Number of characters skipped determines code printed [closed]

Write a program which, when every nth character is skipped, it prints n. For example, if every 2nd character is skipped, it prints 2. Example n=0 foobar Output:...
7
votes
2answers
334 views

Draw the flag of Tennessee

The flag of Tennessee is specified by chapter 498 of the Public Acts of 1905. An oblong flag or banner in length one and two thirds times its width, the large or principal field of same to be of ...
28
votes
11answers
4k views

Mutate my DNA sequence

When translating DNA into proteins, the ribosomes read the sequence of DNA nucleotides 3 by 3. Each set of 3 nucleotides is called a codon, and each codon encodes for an amino acid, with some ...
9
votes
4answers
298 views

A Change in Perspective

In this challenge you will write a piece of text which when viewed from two different angles will create two different programs. Your string as viewed from above must take a string containing only ...
15
votes
2answers
1k views

ASCII TURNED SHAPE

How can we depict a turned shape simply and nicely using ascii characters in 3D space? I suggest this method : Instead of a circle we use a square rotated by 45° for the cutting section so that we ...
-3
votes
0answers
81 views

Credits usage to make selections [closed]

I have Question: Total Budget is 100 credits. I have a1 =10,a2 = 10,a3 =5,a4 = 4,a5 = 2,a6 = 2 If i want to select only a1 using 100 I can choose for 10 times, like a2 10 times, a3 20 times, a4 25 ...
32
votes
20answers
2k views

Length-terminated sequences

We all know the age-old debate - should strings be length-prefixed or should they be null-terminated? Well, you've run into a blob of binary data and apparently whoever made it decided that the best ...
25
votes
9answers
3k views

Implement the 2D Hadamard Transform

The Hadamard transform works similarly to the Fourier transform: it takes a vector and maps it to its frequency components, which are the Walsh functions. Instead of sine waves in the Fourier ...
14
votes
4answers
453 views

List where pinballs would exit a grid of bumpers from different entrance points

Inspired by this lumosity mini game, Pinball Recall We start with a rectangular grid (viewed from above) with several bumpers as follows. Entrances/exits are numbered counter-clockwise starting from ...
5
votes
6answers
247 views

Explore a Klarner-Rado sequence [duplicate]

One of the Klarner-Rado sequences is defined as follows: the first term is \$1\$ for all subsequent terms, the following rule applies: if \$x\$ is present, so are \$2x+1\$ and \$3x+1\$ the sequence ...
-4
votes
0answers
93 views

Reverse it! Quickly! (JAVASCRIPT) [duplicate]

Typically, reversing an array is a pretty straightforward task even for novice programmers. But not when a crowd of angry zombies scratching your door, looking for a fresh brains. In this case even ...
18
votes
25answers
4k views

Visualize a large int

Convert a large int (e. g. 1234567890) into a string containing the usual decimal prefixes k, M, G, T, etc. for kilo, mega, giga, tera, etc. The result shall be groups of three digits, interspersed ...
10
votes
0answers
291 views

Gerrymander North Carolina

The challenge How well can you gerrymander North Carolina into 13 voting districts? In this challenge, you use the following files to draw different maps for Republicans and Democrats. File 1: ...
24
votes
14answers
3k views

Are my triangles similar?

Given (in any structure; flat list, two lists of lists, a tuple of matrices, a 3D array, complex numbers,…) the coordinates for two non-degenerate triangles ...
10
votes
8answers
2k views

Russian Caesar cipher

The objective Given a Russian text, encrypt it with Caesar cipher with key 16. The basic Cyrillic alphabets The basic Cyrillic alphabets are: (U+0410 – U+042F) ...
5
votes
6answers
466 views

Implement the named labels for assembly

Let's assume we've got an imaginary assembler. The assembler supports numerical labels. An infinite loop example: :1 jmp 1 Your task is, to write a ...
15
votes
10answers
981 views

Digit Date Range

NOTE: Since I'm Dutch myself, all dates are in the Dutch dd-MM-yyyy format in the challenge description and test cases. Challenge: Inputs: Start date \$s\$; End ...
3
votes
2answers
194 views

Tips for golfing in MathGolf

What general tips do you have for golfing in MathGolf? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to MathGolf (for tips which can be ...
12
votes
5answers
456 views

Typing, but to the left [closed]

Background You've been given a task to take notes for a meeting. You start typing on your Google Doc, but you don't have enough time during the meeting to look at your keyboard while you type. ...
6
votes
0answers
111 views

Make Korean Character Multi-style Ascii/Box Art

About Hangul As I'm Korean, I'm really proud of Korean character, Hangul(한글). Hangul is artificial character made by King Sejong the great, 4th king of Joseon dynasty, at 1443. Because today(...
17
votes
2answers
514 views

Number of distinct tilings of an n X n square with free n-polyominoes

The newest "nice" OEIS sequence, A328020, was just published a few minutes ago. Number of distinct tilings of an n X n square with free n-polyominoes. This sequence counts tilings up to symmetries ...
8
votes
1answer
533 views

Compute OEIS A161169, approximately and quickly

\$T(n, k)\$ gives the number of permutations of length \$n\$ with up to \$k\$ inversions. This values grows very quickly, for example for \$T(20, 100) = 1551417550117463564\$. The maximum number of ...
24
votes
10answers
2k views

Fermat's polygonal number theorem

Fermat's polygonal number theorem states that every positive integer can be expressed as the sum of at most \$n\$ \$n\$-gonal numbers. This means that every positive integer can be expressed as the ...
20
votes
20answers
5k views

Code Golf Measurer © 2019

Code Golf Measurer © 2019 Hexdumps used with xxd look something like this: ...
-11
votes
7answers
274 views

The null challenge: do nothing [closed]

Write the shortest possible program or function in your language that does nothing. Specifically, it must take no input or ignore its input, and must not produce any output in any legal output method ...
9
votes
3answers
353 views

North Korean dictionary order

The objective Given a string of Hangul syllables, sort the characters in North Korean dictionary order. Introduction to Hangul syllables Hangul(한글) is the Korean writing system invented by Sejong ...
15
votes
5answers
2k views

What's the current zodiac?

Display the emoji of the eastern zodiac of given time, according to given country. The eastern zodiac is a classification scheme that assigns an animal and its reputed attributes to each year in a ...
20
votes
7answers
2k views

Diamondize Some Text

Given an input string of length 2 or longer consisting solely of alphabetical characters [A-Z] or ...
7
votes
2answers
233 views

Is this skew symmetry?

In this challenge, your task is to detect (vertical) Skewer Symmetry. This means that one half of the pattern can be produced by mirroring the other half along a vertical axis, and then moving it ...

15 30 50 per page