Description
This challenge is to guess a number guarded by a very snarky code-commenter. Wrap it in the flag format for submission. Example: ictf{1337244835594660}
(python version 3.10.12 btw)
Attachments
https://cybersharing.net/s/1be0e77ecacfd78d5c675546d6e83208
Writeup
Python stores x
as floating point number, (43 * 95235152386537)/(2**52)
, where the factors of the numerator are prime. Normally, taking x%(x/n)
would result in some small floating point error, but any factors of the numerator, or powers of 2, will not, as x/n
will be exactly x
divided by n
. So, the answer is that large prime factor of the numerator (odds are not allowed).
Some numbers like 2**100 + 1 also work, but the upper bound takes care of them.
Flag