I think knowledge and creativity come into play a bit in golfing. Knowledge of the language you're using (your own language helps a lot since you made it), and using that knowledge in a creative way.
@Dennis cancel all stars on first one, then post **25** Bring. Back. The. Skull!. Have one person star it, if more, cancel all stars and eleven another star. There, I sped it up.
Visualize Bit Weaving is my only top-5 that I spent more than five minutes on, and it's also my favorite. My highest-voted answer (for infinite disk I/O) is junk.
In August we had a task in vocational school to write a program that converts an IP address from console input from decimal to binary. We had three weeks with 90 minutes each week (or 180, I don't know anymore), so I was done in about 10% of the planned time. So I decided that I would add some mo...
@Lembik Since you have said we can assume the PRNG is uniform, we can use that assumption to imply that the generated matrices are uniformly distributed too
So I guess it just needs either a range to be specified, or to say non-zero probability for all and the larger valued ones will just have to have very low probability (rather than insisting on uniform)
I think we've had infinite range random challenges before
Your program/function should
output exactly one integer
output any integer with positive probability
output an integer greater than 1.000.000 or less than -1.000.000 with at least with 50% probability.
Example outputs (all must be possible):
59875669123
12
-42
-4640055890
0
2014
12
24
-71904...
@quartata I have no idea why it caught on fire. There was a bunch of stuff in and around it, too. I only found out because I just saw the scorch marks.
In the alternating fibonacci sequence, you first start with 1 and 1 as usual.
However, instead of always adding the last two values to get the next number, you alternate starting with adding, and every other time you subtract instead.
The sequence starts like this:
1
1
2 # 1 + 1
-1 # 1 - ...