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.
347 questions
10
votes
2
answers
375
views
Check if a number is a power with its program value being a power
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 ...
1
vote
2
answers
194
views
Abuse some parsers your way to a Polyglot [closed]
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 ...
23
votes
15
answers
3k
views
Write two very different programs with the same characters
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 ...
26
votes
53
answers
3k
views
Output your user ID
Output your numeric user ID. Do not use 0-9 in your code. Code golf.
15
votes
6
answers
940
views
Reconstruct your source from separate punctuation and non-punctuation
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 ...
-5
votes
7
answers
490
views
Produce 2025 in any human language, without those characters in your code
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 ...
-7
votes
2
answers
387
views
Output the 97th ASCII character (or "a") without using strings and numbers [duplicate]
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.
...
5
votes
9
answers
3k
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
1k
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
404
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
13
answers
2k
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. Define \$...
6
votes
2
answers
393
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
826
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
952
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 ...