4 ms·
That's exactly how I'd do it! What's supposed to be the better way? Modulo/division by three and five?
by alimw 10y ago
That's exactly how I'd do it! What's supposed to be the better way? Modulo/division by three and five?
- curiousgal 10y ago>Modulo/division by three and five? And fifteen.
- jedberg 10y agofor x in xrange(1,101): if not x % 3: print "Fizz", if not x % 5: print "Buzz", if (x % 3) and (x % 5): print x else: print ""