Linked Questions

22 votes
15 answers

Construct a diverse array

Given an integer \$ n \ge 1 \$, your task is to output an array \$ a \$ consisting of \$ n^2 + 1 \$ integers, such that all possible pairs of integers \$ (x, y) \$ satisfying \$ 1 \le x, y \le n \$ ...
dingledooper's user avatar
  • 22.7k
15 votes
18 answers

It almost works (Robbers' Thread)

Cops' Thread Your challenge is to find an uncracked, unsafe cop on the cops thread, and find an input value for which their code does not do as specified by the challenge. You must use values within ...
emanresu A's user avatar
  • 38.4k
27 votes
21 answers

It almost works (Cops' Thread)

Robbers' Thread Your challenge is to find an existing challenge, and implement it in a way such that certain inputs fail. At least one input must not produce the correct output (use the other ...
emanresu A's user avatar
  • 38.4k
54 votes
203 answers

Scream very loudly

Write a script that outputs A to stdout infinitely. There should be no newlines or separators between the characters. Standard loopholes apply. This is code-golf. ...
Tornado547's user avatar
  • 1,133
22 votes
26 answers

Can I join the music box?

The magic music box (MMB) This explains the motivation for the challenge, feel free to ignore. The magic music box is a word game played by a group of people, where one is the owner of the magic ...
RGS's user avatar
  • 14.1k
33 votes
83 answers

Repeat every other character in string starting with second character

Requirements: Take a single word as input with only lowercase alphabetical characters (a-z) Output a string where every other character is repeated, with the first repeated character being the second ...
Taako's user avatar
  • 569
55 votes
102 answers

Is it double speak?

In an earlier challenge I asked code golfers to produce strings which copy each character in a string. For example: TThhiiss iiss ddoouubbllee ssppeeaakk!! This ...
AJFaraday's user avatar
  • 11.8k
67 votes
103 answers

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 ...
moltarze's user avatar
  • 2,570
19 votes
20 answers

The Written Digits Sequence

Here's a reasonably trivial sequence which is not in the Online Encyclopedia of Integer Sequences. Start with an empty sequence then define each term as the number of characters required to write out,...
Jonathan Allan's user avatar
112 votes
330 answers

Simple cat program

One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after ...
Martin Ender's user avatar
15 votes
40 answers

Hexadecimal Counter

Hexadecimal is a base 16 counting system that goes from 0 to f. Your job is to make a counter that will display these numbers. ...
jado's user avatar
  • 2,682
39 votes
40 answers

Stretching Words

Write a program or function that duplicates letters in a word, so that all the duplicated letters arranged from left to right in the word would form the input array. For example: ...
Stretch Maniac's user avatar
18 votes
39 answers

Stripping off extra spaces from a string

You are given a string. Output the string with one space per words. Challenge Input will be a string (not null or empty), surrounded with quotes(...
Spikatrix's user avatar
  • 1,875
49 votes
19 answers

Tips for golfing in The Shakespeare Programming Language

What general tips do you have for golfing in The Shakespeare Programming Language? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to SPL ...
xenia's user avatar
  • 8,142
23 votes
40 answers

Palindromic palindrome generator

Create a program, that converts input string to a palindrome starting with the input string. The program itself must be a palindrome. For example input: neverod, ...
tmp's user avatar
  • 481

15 30 50 per page