Created
October 2, 2012 03:21
-
-
Save ranman/3815977 to your computer and use it in GitHub Desktop.
awesome fizzbuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
messages = [None, "Fizz", "Buzz", "FizzBuzz"] | |
acc = 810092048 | |
for i in xrange(1, 101): | |
c = acc & 3 | |
print messages[c] if c else i | |
acc = acc >> 2 | c << 28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
explination https://gist.github.com/ggilder/2893724