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
369 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 ...
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 ...
15 votes
6 answers
936 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 ...
-7 votes
2 answers
386 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. ...
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 ...
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 \$...
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 ...
12 votes
9 answers
945 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 ...