3 ms·
Every positive number is a power of 2. Yes, I know, but there is no mention of "integer". Btw, I would just check if log2(x) is an integer.
by tyn 16y ago
Every positive number is a power of 2. Yes, I know, but there is no mention of "integer".
Btw, I would just check if log2(x) is an integer.