3 ms·
OK I cheated and used google and found (60 chars): for i in range(1,101):print'FizzBuzz'[i*i%3*4:8--i**4%5]or i Pastebin of my explanation: http://pastebin.
by glomph 14y ago
OK I cheated and used google and found (60 chars):
for i in range(1,101):print'FizzBuzz'[i*i%3*4:8--i**4%5]or i
Pastebin of my explanation: http://pastebin.com/raw.php?i=00Db30FF http://pastebin.com/raw.php?i=00Db30FF
EDIT: ugh, sometimes I hate markdown, moved post to pastebin.
- GregBuchholz 14y agoAwesomely ingenious use of math above. 59 if newlines count as 1. i=1 while i<101:print'FizzBuzz'[i*i%3*4:8--i**4%5]or i;i+=1
- glomph 14y agoShould have been empty string f[4:4]