4 ms·
That code produces correct output. It passed. PHP does not require a closing ?>
by rorrr 15y ago
That code produces correct output. It passed.
PHP does not require a closing ?>
- jontsai 15y agoOhhh. I was thinking about it wrong. Probably obvious to others, but I forgot about the property that if you have primes p and q, any number n (evenly) divisible by p that is also divisible by q must be divisible by the product of p*q. That shortcut is a result of hyper-optimization and I was thinking more along the lines of code-reusability (e.g. if the rules of FizzBuzz were changed from %3 and %5 to %x and %y) =P