note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "note to self: make a note to self saying "...
okay so if i've understood correctly: find the earliest timestamp for bus 1, find the earliest timestamp for bus 2 starting at the last stamp, then same for the third etc?
so you start at 0, which meets the first requirement, then you keep adding 7 until you meet the second requirement (the number is 14), then keep adding 91 until you meet the third requirement, then add 5369, etc
@RedwolfPrograms the same brute-force method but using modinv to calculate the required additions because i thought my original method is too slow, but it's just cuz i set a while loop with an impossible fail cond
i've also taken the incredibly lazy approach to boilerplate of just making my file for the next day as a copy of my current file before i start writing the solution itself
A is your current working value, B is the product of your previous moduli (the value to add so that it doesn't break your working value), C is the offset of the next bus, D is the next bus index / modulus
...you know, I find it funny that with how the global leaderboard works, we have two people on the private leaderboard between two people who are on the global leaderboard, who are not on the global leaderboard themselves
Input
A string S of length between 2 and 20. The only letters in the string will be a or b.
Output
All strings within Levenshtein distance 2 of S. You must output all the strings without duplicates but in any order you like.
Example
If S = aaa then the output would be (in any order)
a
aa
ab
ba
aa...
@xash Is it possible to make a ' character in convey? I can't seem to put it in a string for obvious reasons, and doing math with characters seems to convert them permanently to numbers.
I took the easy route when implementing it: first all functions are parsed, with . being a 1-1 function. Then, whenever a function has a . in its output, it is applied to it. So {f.} and }.f{ are the same.
It is kinda helpful for this case: https://λ.land/convey/run.html#eyJjIjoiICAgfVxuey8rP1xuIHYuXlxuID4sXiIsInYiOjEsImkiOiIxIDEzIDYgOCJ9
For it to be so simple, +. would have then be one function taking two tiles, so that ? still sees the left as empty … maybe there is a cleaner solution.
Another downside to its non-intuitiveness is that f and f. always need to have the same number of in- and output ports.
You will be given a point (x,y) relative to the center of the Ulam spiral (the point which represents one), and length z. The task is to check whether there exists a path from (0,0) to (x,y) of length z, assuming prime numbers are obstacles and each turn in path has an angle of 90 degrees. Path m...