# All Questions

10,359 questions
5k views

### “As we travel the universe…”

You'll be given the name of one of the 20 biggest objects in the Solar System. Your task is to return an approximation of its radius, expressed in kilometers. This is a code-challenge where your ...
2k views

### Color of a Pixel

Write a program that prints the RGB color of a given pixel on the screen. The program should read a line from stdin in the format x,y, where x and y are unsigned ...
617 views

### Golf a number bigger than Loader's number

As a follow up to Shortest terminating program whose output size exceeds Graham's number and Golf a number bigger than TREE(3), I present a new challenge. Loader's number is a very large number, ...
2k views

### Digital Sumorial

Given an input n, write a program or function that outputs/returns the sum of the digital sums of n for all the bases 1 to ...
2k views

### Computer Cipher

Introduction: I have loads of different ciphers stored in a document I once compiled as a kid, I picked a few of the ones I thought were best suitable for challenges (not too trivial, and not too ...
323 views

You are a Computer Science professor teaching the C programming language. One principle you seek to impart to the students is modularity. Unfortunately, past classes have tended not to get the message,...
2k views

### Make a simple word wrapper

(Note: This is my first ever code golf question, but as far as I can tell, nobody else has done exactly this, so I should be good.) Your task is to make a program or function that takes in a string <...
258 views

### Conjugation in Real Life

In @Adám's Dyalog APL Extended, the (under) operator means conjugation: apply one function, then a second function, then the inverse of the first. It's fun to ...
1k views

### Prime containment numbers (speed edition)

This is sequence A054261 The $n$th prime containment number is the lowest number which contains the first $n$ prime numbers as substrings. For example, the number $235$ is the lowest number ...
2k views

### Prime containment numbers (golf edition)

This is sequence A054261. The $n$th prime containment number is the lowest number which contains the first $n$ prime numbers as substrings. For example, the number $235$ is the lowest number ...
592 views

### Print a square!

Print this text: _________ | | | | | | |_________| Shortest code wins. Notice the space at the start of the first line.
2k views

### Split Mark's marks

Challenge Mark is a student who receives his N marks in a concatenated way in a one single line. The challenge is to separate his marks, knowing that each mark ...
1k views

### Self-contained powers

Given integer n, output the smallest exponent e greater than 1 such that n^e contains ...
1k views

### Number in Number-squared

Consider a sequence of natural numbers for which N appears as a substring in N^2. A018834 Output the nth element of this sequence. Rules Program takes only ...
2k views

96 views

### Tiny, Tiny “Hello, world!” - an adventure in small executables [duplicate]

The challenge: Print Hello, world!. Shortest executable wins. Criteria: Your program must compile into an ELF x86-64 executable that prints ...
261 views

### Compound interest with additions [closed]

You have been given the charge to calculate the current balance as of the day that you perform the calculation for 330,000 individuals who worked for an average of 30 years spanning 300 years where ...
3k views

### Is this number a hill number?

A hill number is a number that has the same digit in the first & the last, but that's not all. In a hill number the first digits are strictly increasing, and the last digits are strictly ...
412 views

### Splitting The Bill

Task Suppose that p pepole have to split a bill; each of them is identified by a triple (Name, n, k) made up of: ...
985 views

### Number of transformations until repeat

Given a sequence of integers or to be more specific a permutation of 0..N transform this sequence as following: output[x] = reverse(input[input[x]]) repeat For ...
1k views

### Drawing the Peano curve

Introduction In geometry, the Peano curve is the first example of a space-filling curve to be discovered, by Giuseppe Peano in 1890. Peano's curve is a surjective, continuous function from the unit ...
254 views

As with most APL symbols, has different meanings when called with one argument (transpose) versus two arguments (dyadic transpose / reorder dimensions). This ...