Linked Questions

476
votes
864answers
160k views

"Hello, World!"

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
96
votes
54answers
10k views

Find an Illegal String

The challenge is to find a string of characters that cannot appear in any legal program in your programming language of choice. That includes comments, strings, or other "non-executable" parts. ...
39
votes
105answers
10k views

Print 0 to 100 without 1-9 characters

Print 0 to 100 without using characters 1,2,3,4,5,6,7,8,9 in your code. Seperator of numbers can be comma, whitespace or newline. Shortest code wins.
51
votes
69answers
21k views

"Creative" ways to determine if an array is sorted

Given an integer array, write a program that determines if it is sorted in ascending order. Remember that this is a code trolling question. I am looking for most interesting ways that people come up ...
39
votes
101answers
5k views

Divisibility test

Task Given two strictly positive integers n and d as input, determine whether n is evenly divisible by d, i.e., if there exists an integer q such that n = qd. You ...
44
votes
92answers
13k views

Draw an ASCII chess board!

Here is a simple challenge for you: You must produce this ASCII representation of a chess board. White is represented by uppercase characters, and black is represented by lowercase. Empty tiles are ...
53
votes
33answers
8k views

Calculate a square and a square root!

You must make a polyglot that outputs the square of the input in one language and the square root of the input in another. The shortest answer in bytes wins! You must have a precision of at least 3 ...
45
votes
56answers
4k views

Is this word Lexically Ordered?

Given an input string S, return truthy if all the letters in S are Lexically Ordered: their ASCII values need to be in either ascending or descending order. Return <...
25
votes
74answers
7k views

Average of your code

Inspired by this Task Your task is to output the average character of your code. What is an average character? Say we have a string golf(). We then take the ASCII ...
62
votes
31answers
4k views

Print my clock's alarm sound

Write the shortest program that prints the sound my alarm clock makes, and stops after an inputted number of beeps. For reference, here is the sound my alarm makes: ...
59
votes
25answers
5k views

Print This Question ↓

The basic idea of a kolmogorov-complexity challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from Borromean Rings to The ...
27
votes
44answers
4k views

Write a Deadfish Interpreter

Sandbox, Codidact A rewrite of this question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following ...
36
votes
31answers
4k views

Find the "Bittiest" Number [closed]

The Challenge Given a list of integers, the "bittiest" number among them is the one with the most bits on - that is, the largest amount of bits set to 1. Write a function (or a program) that ...
40
votes
16answers
5k views

Tips for restricted source in Python

Just like code-golf, restricted-source pushes one to exploit quirks and hidden features of the Python language. We already have a place to collect all these tips for code-golf, those for restricted-...
16
votes
26answers
5k views

Generate a pronounceable word

The challenge is simple: generate a word. Specifications: Word must be pronounceable. This is defined as "alternating between a consonant and a vowel." A consonant is one of the following letters: ...

15 30 50 per page