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.

Filter by
Sorted by
Tagged with
36
votes
11answers
2k views

Different tasks, same characters

In this challenge, you need to solve 4 different tasks using the same set of characters. You can rearrange the characters, but you can't add or remove characters. The winner will be the submission ...
51
votes
43answers
7k views

Print all ASCII alphanumeric characters without using them

Challenge Print the following characters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 The catch is that you may not use any one of them in ...
28
votes
11answers
1k views

2016 Time Capsule String: Climb The Integer Ladder

Using the 74 characters from the 2016 time capsule string H@~*^)$.`~+1A|Q)p~`\Z!IQ~e:O.~@``#|9@)Tf\eT`=(!``|`~!y!`) Q~$x.4|m4~~&!L{% write N code snippets ...
71
votes
27answers
6k views

2016 Time Capsule String: How Versatile Is Your Language?

About a year ago on Dec 31, 2015, I had the idea that: We should make a time capsule string. Everybody gets to add one character and next new years we'll see who can make the best program out of ...
41
votes
15answers
5k views

Determine whether a number is 2017-friable without primes in your source code

Out of all the years I've been making this challenge, 2017 is the first year that's been a prime number. So the question will be about prime numbers and their properties. Your task is to produce a ...
26
votes
2answers
1k views

Fastest Mini-Flak Quine

Mini-Flak is a subset of the Brain-Flak language, where the <>, <...> and [] ...
16
votes
1answer
740 views

Every prime bit must alternate

A program is bit primed if bits in prime positions must alternate between zero and one, starting with one. For example, this is a template for a bit primed program with [0..47] bits. ...
19
votes
6answers
698 views

Count the characters - bit by bit!

The simple part: Given an input string containing only printable ASCII-characters (space - tilde), count the number of occurrences of each character and return the result on any convenient format. The ...
5
votes
4answers
614 views

The Essential™ (comment-free) Convenient Palindromic Quine Golf

A program is "conveniently palindromic" if it is equal to the string derived when its reverse has all its parentheses (()), brackets (...
-9
votes
16answers
643 views

Count up from 0 to 2017 without numbers in your source

This question was profoundly inspired by Joe Z's question. But, with a twist... So, now that it's almost 2017, it's time for a code question involving the number 2017. Your task is to make a ...
19
votes
27answers
2k views

8 ought to become Infinity [closed]

Let's take a look on a typical loop, which usually performs 8 iterations: for (int x=0; x<8; ++x); You have to make it infinite! It's a popularity-contest ...
48
votes
66answers
6k views

Depalindromize this string!

Given a palindrome generated according to this challenge, depalindromize it. Test cases ...
13
votes
23answers
2k views

Palindromize this string! [duplicate]

Your task is to palindromize a string as follows: Take the string. abcde Reverse it. edcba Remove the first letter. <...
10
votes
3answers
1k views

C# is the Main problem

This programming puzzle is inspired by another question which has been asked here yesterday but which was deleted by the author... The challenge: Create an executable binary (Windows .EXE or Linux ...
10
votes
0answers
202 views

“Could you repeat yourself?” aka Could a doubled character solution exist in JavaScript? [duplicate]

This thinking exercise is inspired from Super Chafouin's question "Just Repeat Yourself" in which the phrase "Do not repeat yourself!" had to be outputted using code that was basically a series of ...
-8
votes
11answers
376 views

Outputting x to y

Challenge You must choose one number x (y = x + 9) and create ten unique programs which each print out one of the numbers in ...
56
votes
50answers
10k views

Print every printable ASCII character without using it

In a programming language of your choice, write 95 programs, each of which outputs a different one of the 95 printable ASCII characters without that character occurring anywhere in the program. For ...
72
votes
179answers
18k views

The Letter A without A

Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of ...
2
votes
11answers
321 views

Multiplify a number [closed]

Challenge description Multiplification (totally not a made-up word) is a process in which you take two positive integers: a and ...
65
votes
11answers
3k views

Only Even Bytes

The scenario Lately you have been noticing some strange behavior with your favorite text editor. At first it seemed that it was ignoring random characters in your code when writing to disk. After a ...
-8
votes
2answers
239 views

Number to String [closed]

Number to String Instructions Convert a signed 32-bit integer to a string (base-10 preferably) without any string formatting calls (or built in type coercion that will directly convert a number to a ...
5
votes
11answers
1k views

Recursion bracketed; or Dyck words generation

We already have challenges to check if a string of brackets is fully matched and to count the number of balanced strings. It remains for us to generate these strings, but it will not be so easy… A ...
4
votes
20answers
2k views

Illiteral Prime numbers [duplicate]

Your challenge is to write a program (full program, not a function), that will take an integer and output all prime numbers up to (including) the given integer. Output is any readable list containing ...
-5
votes
13answers
690 views

Output the alphabet using the alphabet

The title is pretty self-explanatory, isn't it? Your task is to output the alphabet (the string "abcdefghijklmnopqrstuvwxyz") to STDOUT, using each and every ...
-2
votes
2answers
204 views

Restricted average (arithmetic mean) – i.e. without obvious built-ins [closed]

Introduction The arithmetic mean is defined as being equal to the sum of the numerical values of each and every observation divided by the total number of observations. Symbolically, if we have a ...
11
votes
23answers
1k views

Find the positive divisors!

Definition A number is positive if it is greater than zero. A number (A) is the divisor of another number (B) if ...
6
votes
1answer
451 views

QWERTY Quine Creation

Challenge Create a quine, that instead of outputting it's source, output's it's source QWERTY-sorted. What is QWERTY sorting? QWERTY sorting is sorting code by the QWERTY keyboard. Anything higher ...
73
votes
24answers
4k views

Tweetable hash function challenge

In this code-challenge you will write a hash function in 140 bytes1 or less of source code. The hash function must take an ASCII string as input, and return a 24-bit unsigned integer ([0, 224-1]) as ...
-6
votes
4answers
357 views

Write a palindrome that prints “Hello, World!” without using comments [duplicate]

Your Task: Print "Hello, World!" using a palindrome. Simple, right? Nope. You have one restriction: you may not use comments. "Comments" include Normal // or <...
48
votes
2answers
2k views

JSF**k with only 5 symbols?

This is not a challenge but a question, I figured it was on topic because of Non-challenge questions that are related to solving programming puzzles or a particular type of challenge are also on ...
-2
votes
1answer
387 views

Implement branchless binary search

Challenge Implement binary search on a list of length 256 with no branches. Specification Input an integer X and a strictly increasing list of integers Output is ...
-3
votes
1answer
139 views

Implement decimal-multiplication modulo

Most people can't easily do modulus (or work out if a number is divisible by another number) in their heads because long division is harder than addition, subtraction and multiplication. The following ...
31
votes
9answers
7k views

Build a twisted “Hello world!”

Your job is quite simple, write a program that prints Hello, world!, that when twisted creates a program that prints Twister!. ...
26
votes
11answers
2k views

Official Dyalog APL 2016 Year Game

If you think this could be fun, but too much work, consider participating in this much smaller challenge. A bit of fun (and possibly frustration!) for 2016... Dyalog's "puzzle of the year". Enjoy! ...
-7
votes
2answers
228 views

Unique multiplication by ten [closed]

People, it's a popularity contest, you have to do somthing cool here. Think about cool ways of breaking the code in most languages, not about validating for everyting! Initially this challenge ...
12
votes
22answers
2k views

10 9 8 7 6 5 4 3 2 1… Print 2016

As a spin-off to my challenge over at Puzzling, your goal is to output 2016. Rules: You must include the numbers ...
3
votes
1answer
399 views

Detect my accent

Your task is to write a program or function that detects accents in UTF-8 input. The catch is that your code must be written entirely in an 8-bit character encoding. The code will output a single ...
26
votes
2answers
602 views

Lipogram “quine”

Task Take a single Unicode character as input. Output a program in the same language that also obeys this specification, but which does not contain the input character. If your program is run with ...
5
votes
8answers
838 views

Using Symbols for Letters

Input: A single word as a string (matches [a-zA-Z]+). If the input doesn't follow these guidelines, print "Error" (but no error should be thrown) Output: The ...
19
votes
10answers
6k views

Print the QWERTY keyboard using keys that are as close together as possible

Normally, challenges are scored in bytes, or sometimes Levenshtein distance, but for this one we're using keyboard distance -- the number of keys between the keys used to type the program (use the ...
-3
votes
3answers
440 views

Does the string contain 2016? [closed]

Given a string input, your task is to write a program that prints a truthy value to STDOUT or equivalent if the input contains "2016" anywhere in it without using any built-in ...
24
votes
12answers
2k views

The Complement Cat

Objective Write a full program that outputs (to STDOUT or closest alternative) an arbitrary string of text, no more than 64 characters long. Simple enough, right? Well, here's the catch: You may not ...
16
votes
32answers
1k views

Maximizing output from minimal input

Obviously, code golfing is all about making the most of the least code. Who really cares what the actual output is? While we have had a challenge for highest input-to-output ratio, this is a call for ...
70
votes
76answers
6k views

No strings (or numbers) attached

If you like this, consider participating in: The Official Dyalog APL 2016 Year Game The monthly Dyalog APL 2017 Code Golf Challenge Make 12 snippets/expressions, in the same language, that result in ...
44
votes
31answers
10k views

Check if a UUID is valid without using regexes

Given a string input, write a program that prints a truthy value to STDOUT or equivalent if the input is a valid UUID, without using regexes. A valid UUID is 32 hexadecimal digits, displayed in ...
20
votes
2answers
1k views

90° Self-Rotating Program

Introduction Write a complete program that rotates a rectangular block of ASCII characters 90 degrees clockwise. When the program itself is rotated 90 degrees clockwise, it rotates a block of ASCII ...
90
votes
23answers
11k views

Programming a Pristine World

Let's define a pristine program as a program that does not have any errors itself but will error if you modify it by removing any contiguous substring of N characters, where ...
12
votes
5answers
607 views

Avoid repeating letters between five simple programs

You're challenge is to write 5 different full programs for the 5 following tasks: Print Hello, World! Given an input with STDIN, output the factorial, you can ...
18
votes
5answers
2k views

The jQuery showdown

Some time after this incident… There are some of us who are against this defiling order of jQuery. It is an unholy presence, of which must be exterminated. I therefore call on you, the loyal ...
18
votes
4answers
1k views

Print a Symbolic Negative of your Code

(This is a variation on Print a Negative of your Code, which I enjoyed a lot! Thanks to Martin Büttner♦ - almost all of this text is his.) Let's consider the symbols to be the following printable ...