Skip to main content
The National Cipher Challenge

Reply To: Programming

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Programming Reply To: Programming

#109955
F6EXB_the_frenchy
Participant

@ByteInBits
I was influenced by the sentence: “A number is chosen at random from the first 100 positive integers.” That’s why I did a random draw.
With 100 loops, I sometimes get the theoretical number of 42%, but not every time I try. It’s like flipping a coin. I didn’t program a theoretical calculation (in fact, we can clearly see that among the first 100 integers, there are 42 numbers that are not divisible by 3, 4, or 7). I did a random draw, which results in deviations from the theoretical result. That’s why I used a large number of loops to get closer to the correct result.

Translated with DeepL.com (free version)

Report a problem