# Questions tagged [restricted-source]

Imposes a restriction on the source code used to solve the challenge, for example, having no numbers in the source code.

267 questions
6k views

### Find the absolute value of a number without built-in functions [closed]

The challenge is to take any real number as input and output or return the absolute value. You may not use any built-in functions other than those dealing with input and output/returning. This is code ...
452 views

### Bitwise GCD Challenge

Write the shortest iterative function to find gcd of two numbers (assume 32 bit numbers). Rules: Arithmetic, Comparison and Logical Operators are not allowed (except equality comparison (...
650 views

### Shortest Mirror Quine Challenge [closed]

Find the shortest mirror quine in a language of your choice. A mirror quine is a quine whose source code is equal to the reverse of its own source code. Note: 1) Length of source code should be ...
773 views

The problem is very simple: write a program that accepts a single unsigned integer from the command line, and prints out that many random numbers on the standard output, in ascending order. For ...
14k views

### Print the alphabet without using each vowel

Inspiration: in 1939, a man named Ernest Vincent Wright wrote a novel called Gadsby without using the letter 'e'. Your task is to write a set of (up to 5) programs in any language (which has a text-...
855 views

### Generate the list [1, 0, -1, 0, 1, 0, -1, 0, …] [closed]

In the spirit of a question on math.se: given an integer n, return the integer in position n of the sequence [1, 0, -1, 0, 1, 0, ...
6k views

### Determine if a number is divisible by 13 (without using 13 itself) [closed]

Your challenge, should you choose to accept it, is to create a function or a program that outputs "yes" if a given number is divisible by 13 and outputs "no" if it isn't. Rules: - You're not allowed ...
4k views

### Adding without using a + or - sign

There have been many "Do __ without __" challenges before, but I hope that this is one of the most challenging. The Challenge You are to write a program that takes two natural numbers (whole numbers ...
6k views

### Look and say sequence [duplicate]

The look and say sequence is a basic form of run length encoding. The sequence starts with the number 1 and each additional number encodes the number of digits that are repeated before each digit ...
4k views

### Shuffle a deck without local variables [closed]

The object of this puzzle is to take a deck of 52 cards and shuffle it so that each card is in a random position. Given: An array, deck, of 52 distinct integers ...
12k views

### Hello World 0.0!

source: Dilbert, September 8, 1992 I'm hoping to add a new twist on the classic "Hello World!" program. Code a program that outputs Hello World! without: String/...
3k views

### Multiply without multiply [closed]

Write the fastest (best big-O) and smallest multiplication algorithm for positive integers, without using multiplication operators. You are only allowed addition, subtraction, logical functions (AND, ...
3k views

### Calculate 500 digits of pi

Write a program to calculate the first 500 digits of pi, meeting the rules below: It must be less than 500 characters in length. It cannot include "pi", "math.pi" or similar pi constants, nor may it ...
415 views

### Remainder When N divided by 2^M

Write the shortest code to find the remainder when an input number N is divided by 2^M. You cannot use /,* and % operator. ...
35k views

### Obfuscated Hello World

Create the shortest possible obfuscated program that displays the text "Hello World". In order to be considered an obfuscated program, it must meet at least two of the following requirements: Does ...