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.
340
questions
4
votes
9
answers
2k
views
nimi ale lon toki pona! (Every word in Toki Pona!)
"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 ...
0
votes
17
answers
852
views
Smallest integer \$n\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$
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 ...
7
votes
1
answer
312
views
Literate Programming in Base 26
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 ...
5
votes
11
answers
1k
views
Print the banned characters based on the most common characters
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. The ...
6
votes
0
answers
288
views
Shortest CSS selector to select ALL html elements, without using asterisk *
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:
...
21
votes
8
answers
3k
views
Do you win a Numeric Mahjong?
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 ...
8
votes
8
answers
661
views
Magic OEIS formulae (Robbers' thread)
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 ...
12
votes
9
answers
773
views
Magic OEIS formulae (Cops' thread)
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 ...
-10
votes
10
answers
375
views
Wrt "Hello World" prgrm bt wth n vwls
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.
...
16
votes
7
answers
2k
views
Output a Latin square with a program which is a Latin square
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 ...
-11
votes
13
answers
374
views
Check if my input was 'hi whats up' without using any of those letters in your code
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 ...
-12
votes
8
answers
544
views
Write "tut-tut-tut" without using "tut"
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 ...
23
votes
4
answers
1k
views
Gray coded Gray code convertor
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 ...
-12
votes
5
answers
386
views
12 with no 1234567890, but polyglot
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 ...
10
votes
13
answers
3k
views
Robbers: Smallest subset of characters required for Turing Completeness
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 ...
29
votes
31
answers
8k
views
Smallest subset of characters required for Turing Completeness
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 ...
10
votes
8
answers
622
views
Biggest katlani noun dictionary in 400 bytes
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, ...
19
votes
52
answers
3k
views
Can you give me half? (No digits) [closed]
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, ...
4
votes
1
answer
465
views
Write a fast-growing assembly function
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.
...
33
votes
23
answers
9k
views
R.E.P.A.I.R. T.H.E. K.E.Y.B.O.A.R.D
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 ...
7
votes
19
answers
2k
views
To count the sum of all Unicode characters of a given input under an interesting constraint
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 :...
-4
votes
8
answers
1k
views
Let's rise higher [closed]
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 ...
6
votes
3
answers
293
views
Tips for restricted source in Powershell
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 ...
11
votes
15
answers
2k
views
Alphabet printing challenge
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 ...
-13
votes
24
answers
805
views
“Simple” Programming Homework
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 ...
13
votes
10
answers
1k
views
Autogrammatic pairs
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 ...
-4
votes
1
answer
250
views
Python Prime Problem [duplicate]
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 (...
-3
votes
34
answers
1k
views
Print A-Z and their alphabet index without using 1,2,4,6
You need to print A-Z like this:
...
24
votes
12
answers
4k
views
Pangram "Hello, World!"
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 ...
74
votes
173
answers
17k
views
Print 0 to 100 without 1-9 characters
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>, <...
27
votes
72
answers
6k
views
1, 2, miss a few, 99, 100
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 ...
12
votes
5
answers
381
views
Tips for restricted source in zsh
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 ...
-10
votes
5
answers
612
views
Print your username by ONLY using the characters in your username [closed]
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
...
4
votes
5
answers
656
views
Largest Error Message in 100 bytes [duplicate]
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 ...
35
votes
21
answers
4k
views
Which answer did this user write?
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\...
27
votes
70
answers
3k
views
Quickly! Group together!
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:
...
121
votes
19
answers
64k
views
"Hello, World!" in zero lines of code
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 ...
11
votes
25
answers
1k
views
Almost Illegal Strings, Mark II (Robbers)
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 ...
24
votes
27
answers
2k
views
Almost Illegal Strings, Mark II (Cops)
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 ...
7
votes
22
answers
2k
views
Output all of printable ASCII using all of printable ASCII
Output all 95 bytes from 0x20 to 0x7E inclusive (printable ASCII including space), in any order, each at least once. The source ...
17
votes
3
answers
748
views
Tips for restricted source in Haskell
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 ...
5
votes
4
answers
364
views
More Codington Crescent
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 ...
28
votes
27
answers
4k
views
Minimal maximum byte for Turing Completeness
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 ...
10
votes
9
answers
797
views
Codington Crescent [duplicate]
Let's just see how this goes
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 ...
6
votes
17
answers
916
views
Prime Challenge
CODE GOLF & Coding Challenges: In today's challenge, you'll be asked to print the following very special AND tricky AND satisfying Prime Number...! Are you golfers ready?
...
42
votes
17
answers
6k
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-...
45
votes
142
answers
12k
views
Print X without X (robber's thread)
This is the robber's thread of a cops-and-robbers challenge. You can view the cop's thread here
A pretty common beginner style question is to print some string, but, there's a catch!, you need to do ...
74
votes
155
answers
14k
views
Print X without X (cop's thread)
This is the cop's thread of a cops-and-robbers challenge. You can view the robber's thread here
A pretty common beginner style question is to print some string, but there's a catch! You need to do it ...
18
votes
40
answers
3k
views
The ASCII character countdown!
Since this is a answer-chaining challenge, you might want to sort answers by oldest.
Your task is simple: Choose any printable ASCII character that's not chosen in the previous answers. And then, you ...
17
votes
20
answers
3k
views
And and… and. And.?
Introduction:
Inspired by the Puzzling-stackexchange post with the same name, which I've answered four years ago:
Can you create a perfectly valid English sentence, which makes perfect sense, but ...