Largest number with no repeating substrings of length \$l\$
Inspired by this question, in turn inspired by this one.
When I read the above questions, I thought: "Cool". And then I thought "What if we go further?"
Therefore, in this challenge, you must find the largest number that has no repeating...
Your challenge is to construct a proper quine using as few distinct characters as possible.
Scoring
The fewer distinct characters, the better. Standard quine rules apply.
@StackMeter i'm not sure what the confusion is. minimum characters for TC complete and utter completeness is 8 characters (or 7 for python 2). Your answer is not that, so therefore it can be improved
Write a program that seemingly adds the numbers 2 and 2 and outputs 5. This is an underhanded contest.
Your program cannot output any errors. Watch out for memory holes! Input is optional.
Redefining 2+2 as 5 is not very creative! Don't doublethink it, try something else.
Smallest number of panels to represent \$1\$ through \$n\$ in base \$b\$
Inspired by this question. (I have taken a lot of inspiration from Puzzling recently).
Because not all of you spend all your (non-code-golf) time looking at puzzles, let me explain the relevant details.
The challenge involve...
Any programming language which is
Turing complete, and which is able to
output any string (by a computable
function of the string as program —
this is a technical condition that is
satisfied in every programming
language in existence) has a quine
program (and, in fact, infinitely...
According to Wikipedia,
In mathematics, a natural number \$n\$ is a Blum integer if \$n = p \times q\$ is a semiprime for which \$p\$ and \$q\$ are distinct prime numbers congruent to \$3 \bmod 4\$. That is, \$p\$ and \$q\$ must be of the form \$4t + 3\$, for some integer \$t\$. Integers of this...
@cairdcoinheringaahing Well, that answer says that the language has to have two properties: Be Turing complete and be able to output any arbitrary string
But look. Here's my quine: s='s=%r;print(s%%s)';print(s%s). Except now the output now has a 1/0; before it, which means I need to prepend 1/0; to my code to match: 1/0;s='s=%r;print(s%%s)';print(s%s). But now it errors! So a quine is impossible (using STDOUT, at least).
Generally the format of a quine is: 1. assign data to var (`x = [1,2,3]`) 2. Print initial prefix of assignment (`x=`) 3. Print evallable version of data (`[1,2,3]`) 4. Convert data to a string representing steps 2-4 (`map(chr,x)`)
I have a million ints and I want to find the smallest ones up to a given sum. That is I have a limit T and I want to find as many ints as possible with the rule that they must add up to at most T and they should be the smallest ints that do. I am allowed a fraction of an jnt for the last one. I could just sort them and add them from the smallest until I hit T
This is the fractional knapsack problem
But can you do it in linear time with a clever partitioning somehow?
CMIPS: Is there a polite way to ask someone if English isn't their native language, and if so, ask them to say something in their native language and then use Google Translate?
There's only one question for machine-language golfing, and it's for the ia32 and amd64 architectures. Here's one for a predecessor of them: the Zilog Z80!
The ISA is available here.
As usual, if your tip is only applicable to a certain environment/calling convention, please indicate that in your...
OK seriously the JS hate is getting old. I mean come on, without JS you wouldn't be here hating on JS, you would still be watching Back To The Future for the 10000th time without anything to do.
(in response to StackMeter's starred message in the sidebar)
@cairdcoinheringaahing what's the prime factorisation?
factordb says it has a composite factor of 689539422649018752878861658750616995870369544935202767974383066912392056136428966599586273912082194848945422301346607846 178003703930933971893839615747294514108676629444000650335065089381496030926663522085890041923853950574211267899999212757 230112472592717826970496604387131426478524328787373026018254586901814829886298546537728002164876626205001247347395284278 240746034933880796441215665284294577160986480091155287816579871455635051810965519299 but doesn't know any factors of that
is there any way to base-64 encode unicode characters in JS
trying to use btoa(JSON.stringify(x)) to encode values in my online interpreter's input fields but it breaks when my code has non-ASCII characters it seems
@Underslash they changed "based on [this closed challenge], [related]" to "this is based on [this closed challenge] and [a related one]" and Ascii to ASCII
i rejected it because you never said that your challenge was based on the related challenge but rather just that it was related, but Ascii => ASCII is fair enough
@JNat I'm guessing that the question ads display a different image in the ad than in the normal image ads? The question body says "staff will generate a frame for the ad with this site's theme, for brand consistency". Could you elaborate a bit on that?
@Bubbler Also, for TryInBrowser, how are you making everything work without a GitHub action? Simply forking your repo didn't work because pkg/package.js wasn't found, as expected
Unfortunately I didn't have much time so I didn't read it through that thoroughly in the Sandbox, but there's no requirement of bijectivity or even injectivity...
> All badge queries exclude Community in an effort to treat robots as second class citizens so that they don't get any delusions of grandeur and remain in their place of servitude to our great cause. This is quite intentional.