Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

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
10 votes
2 answers
368 views

Task: Your task is make a program to check if there exists integers \$a \ge 2, b \ge 2\$ such that \$a^b=i\$ where \$i\$ is the input integer at least 2. The catch is that your program must return a ...
Fmbalbuena's user avatar
  • 5,085
1 vote
2 answers
186 views

Many polyglots fill in the blanks between languages by either making code that is ignored in one language or loading code dynamically. This time, let's write a polyglot that works without that. This ...
user31248584's user avatar
23 votes
15 answers
3k views

Your task is to write two programs/functions, in the same language. Program 1: Verify that two inputs are anagrams of each other. Program 2: Verify that two inputs differ from each other at every ...
Steve Bennett's user avatar
27 votes
51 answers
3k views

Output your numeric user ID. Do not use 0-9 in your code. Code golf.
Steve Bennett's user avatar
15 votes
6 answers
936 views

Oh dear. An overzealous cleaner has separated out the punctuation in your source code. Write a program or function that, when passed its source code separated into punctuation and non-punctuation (but ...
Steve Bennett's user avatar
-5 votes
7 answers
488 views

It's 2025! Write a function/program that outputs this number in words. There are two twists: You can write it out in (almost) any human language (including English). None of the characters in your ...
Steve Bennett's user avatar
-7 votes
2 answers
385 views

Side note If this question contains something copied from some other question. This is definitely not my fault since i didn't knew the question existed Back to the question The challenge is simple. ...
Gleb's user avatar
  • 353
5 votes
9 answers
3k views

"nimi ale lon toki pona" is a song by YouTuber jan Misali which lists 137 common words in the constructed language Toki Pona. This challenge is not a duplicate of "How high can you ...
3-1-4-One-Five's user avatar
0 votes
17 answers
1k views

Write code that outputs the smallest integer \$n > 5\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$. Your code may have at most one digit in its source code. You can use ...
Simd's user avatar
  • 3,167
7 votes
1 answer
401 views

Your task is to convert non-empty strings - between strings using the 26 letters, and programs, which are strings of bytes, where each byte has 256 possible values. You should use the same codepage ...
Command Master's user avatar
5 votes
13 answers
2k views

This is an answer-chaining post, so in this challenge every answer (except the first answer) depends on the previous answer. The goal of this challenge is to output the restricted characters. Define \$...
Fmbalbuena's user avatar
  • 5,085
6 votes
2 answers
391 views

What is the shortest selector (by character count) to select ALL html elements on a web page, without using asterisk (*)? Some examples are the following: ...
user3163495's user avatar
21 votes
8 answers
3k views

Background Numeric Mahjong is a hypothetical variation of Japanese Mahjong, played with nonnegative integers instead of Mahjong tiles. Given a list of nonnegative integers, it is a winning hand if it ...
Bubbler's user avatar
  • 79.3k
8 votes
8 answers
819 views

This is the robbers' thread. See the cops' thread here. In this cops and robbers challenge, the cops will be tasked with writing an algorithm that computes some function of their choice, while the ...
dingledooper's user avatar
  • 23.4k
12 votes
9 answers
941 views

This is the cops' thread. See the robbers' thread here. In this cops and robbers challenge, the cops will be tasked with writing an algorithm that computes some function of their choice, while the ...
dingledooper's user avatar
  • 23.4k
-12 votes
10 answers
491 views

Create A "Hello, World!" program but without any vowels. Winner is the program with the least bytes. Rules: No vowels are allowed in the code. Must print to STDOUT Must be a full program. ...
Wallace's user avatar
  • 117
16 votes
7 answers
2k views

A Latin square of order n is text which is arranged as a square of n lines by n columns, contains n different characters, and each character appears once in each line and column. For example, here is ...
anatolyg's user avatar
  • 14.1k
-12 votes
13 answers
491 views

Write a script, program or function which takes one input of type string and outputs or returns some sort of indication wether the input string was 'hi whats up' (without the apostrophes) or not. You ...
Squareoot's user avatar
  • 163
-13 votes
8 answers
665 views

Following this question: Tut-tut-tut-tut-tut Write a program that writes "tut-tut-tut" without using the characters "t", "u" or "-" in the code itself. This is ...
JuanCa's user avatar
  • 361
23 votes
4 answers
2k views

To increase data safety at our company, we are planning to start using Gray code numbers (where successive values differ by only one bit) instead of classical binary ones. Please help us to make a ...
Jiří's user avatar
  • 1,925
-14 votes
5 answers
479 views

This is my 12th question, so I thought of this idea. Goal: Output 12, with any preceding or trailing whitespace permitted In as many languages as possible (where different versions or flags count as ...
Number Basher's user avatar
10 votes
13 answers
3k views

This is the robbers' challenge. The cops' one is here. In Fewest (distinct) characters for Turing Completeness, the goal is to find the minimum number of characters which make a language Turing ...
rydwolf's user avatar
  • 19.3k
30 votes
31 answers
8k views

In Fewest (distinct) characters for Turing Completeness, the goal is to find the minimum number of characters which make a language Turing Complete...in other words, allow it to do any computation ...
rydwolf's user avatar
  • 19.3k
9 votes
8 answers
723 views

Katlani is a constructed language being designed in chat. In this challenge, your goal is to print the largest dictionary of katlani nouns possible in 400 bytes or less. Task In 400 bytes or less, ...
rydwolf's user avatar
  • 19.3k
19 votes
52 answers
4k views

The task is to provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, double, etc), not as a string. The catch, ...
Eliseo D'Annunzio's user avatar
4 votes
1 answer
545 views

Synopsis Your goal is to implement the (asymptotically) fastest growing function within bounded code on a fictional CPU utilizing a quite limited, yet (probably) turing-complete instruction set. ...
univalence's user avatar
  • 1,669
34 votes
23 answers
10k views

Sequel of this AWESOME challenge You, a genius tech prodigy detective, have successfully disarmed the bomb and want to break into the computer. The police found the password ...
avarice's user avatar
  • 12.5k
7 votes
19 answers
2k views

Program: To count the sum of all Unicode characters of a given input. (No need to display the output. The final answer can be calculated in any base no need to convert back to hexadecimal.) Test case :...
Aatmaj's user avatar
  • 243
-5 votes
8 answers
1k views

Challenge The main objective of the challenge is pretty simple, this is an answer chaining contest, where you have to serially print numbers from 1. That means User 1's answer will print ...
avarice's user avatar
  • 12.5k
6 votes
3 answers
339 views

Adapted from Tips for restricted source in Python Just like code-golf, restricted-source pushes one to exploit quirks and hidden features of the Powershell language. Now, We already have a place to ...
avarice's user avatar
  • 12.5k
11 votes
15 answers
3k views

This challenge is related Challenge Your task is to write as many programs/snippets as you can, where each one outputs/prints/ returns an alphabet. The first program must output the letter ...
avarice's user avatar
  • 12.5k
-12 votes
24 answers
1k views

Your friend has been caught sleeping in class again! As punishment, his computer science teacher has assigned him homework, knowing that he will not be able to solve it due to not having paid any ...
user101295's user avatar
13 votes
10 answers
1k views

For today's task, we have two programs, P and Q, both in the same language. Each of them receives a single-character input. If P receives character K, P says how many times K appeared in Q. (You can ...
AndrewTheCodegolfer's user avatar
-5 votes
1 answer
295 views

Your challenge is to write a Python program to print all the primes (separated by whitespace) less than a given integer N with an asterisk (...
user101295's user avatar
-2 votes
34 answers
2k views

You need to print A-Z like this: ...
user avatar
24 votes
12 answers
4k views

Your challenge: The code must print "Hello, World!" and nothing else. Your restrictions: Your program must satisfy these requirements: The program must be a pangram. It must use every ...
Hyperbole's user avatar
  • 343
76 votes
180 answers
19k views

Print integers 0 to 100 (inclusive) without using characters 123456789 in your code. Separator of numbers can be comma or white space (by default <blank>, <...
user avatar
28 votes
72 answers
7k views

When I was a kid, there was a "really cool" shortcut to count to 100: 1, 2, miss a few, 99, 100 Output the exact string above, in the fewest characters ...
rybo111's user avatar
  • 4,565
12 votes
5 answers
457 views

Adapted from tips for restricted-source in Python Just like code-golf, restricted-source pushes one to exploit quirks and hidden features of the zsh language. While we already have a place to collect ...
pxeger's user avatar
  • 25.3k
-12 votes
5 answers
694 views

You have to print out your username, by only using the characters in your username. Standard loopholes are forbidden This is not code-golf, so shortest does not win Don't modify your username please ...
avarice's user avatar
  • 12.5k
4 votes
5 answers
814 views

The goal is to raise the error message with the most bytes! The error message may not be generated by the program itself, such as Python's raise. errors that do not ...
someone's user avatar
  • 339
35 votes
21 answers
4k views

EDIT (Jan 19, 2022, 18:00 UTC): This challenge is now over. The winner is Citty with this Pyth answer. Congratulations! This is an answer-chaining challenge where each answer must take an integer \$N\...
Arnauld's user avatar
  • 206k
27 votes
70 answers
4k views

As of 27/12/20, the challenge is over as no new answers were posted on the 26th. With an astounding 55 points (and 21 answers), the winner is pppery! A quick shout out to the top 5 scorers as well: ...
caird coinheringaahing's user avatar
121 votes
19 answers
64k views

NPM's sloc is a moderately popular tool for counting source lines of code in a file. The tool will attempt to strip out both single and multiline comments and count the remaining lines in order to get ...
Sisyphus's user avatar
  • 15.1k
12 votes
27 answers
2k views

This is the robbers' thread for 'Almost Illegal Strings'. See the cop's thread for information on participating. A section from the post is included here for convenience. The Robbers' Challenge Find ...
Sisyphus's user avatar
  • 15.1k
24 votes
29 answers
2k views

Edit 2020-11-06: This challenge has been edited with new provisions to encourage participation. The edits have been bolded for emphasis. Welcome to a cops and robbers version of Find an Illegal ...
Sisyphus's user avatar
  • 15.1k
7 votes
22 answers
3k views

Output all 95 bytes from 0x20 to 0x7E inclusive (printable ASCII including space), in any order, each at least once. The source ...
pxeger's user avatar
  • 25.3k
17 votes
3 answers
782 views

I tested the waters on this sort of question with python, but now I get to the real question I want to ask. restricted-source challenges are uniquely rewarding in Haskell because of Haskell's strict ...
Wheat Wizard's user avatar
  • 103k
5 votes
4 answers
410 views

Who's up for a second attempt? If you've ever listened to the radio program "I'm sorry, I haven't a clue", then you've probably heard of the game called "Mornington Crescent". For ...
lyxal's user avatar
  • 35.6k
28 votes
27 answers
4k views

Summary We already have a challenge for the minimal number of characters for Turing completeness. But what about the minimal maximum byte? Challenge For a language of your choice, find a subset of ...
Sisyphus's user avatar
  • 15.1k

1
2 3 4 5
7