by jaegerpicker · 13y ago · 0 comments
Scores 69 in python but the login/signup is broken :)
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=00Db30FFEDIT: ugh, sometimes I hate markdown, moved post to pastebin.
i=1
while i<101:print'FizzBuzz'[i*i%3*4:8--i**4%5]or i;i+=1 n=1
while n<101:print'Fizz'*(n%3<1)+'Buzz'*(n%5<1)or n;n+=1 for i in range(1,101):print 'FizzBuzz' if not i%15 else 'Fizz' if not i%3 else 'Buzz' if not i%5 else iEven a little shorter :)
for i in range(1,101):print "Fizz" if not i%3 else '' + "Buzz" if not i%5 else str(i) if (i%3) else ''
Edit: Down to 82 characters now. I'm not sure if this would work on every Python, but it works on mine. for i in range(1,101):print(("Fizz"if i%3==0 else'')+("Buzz"if i%5==0 else''))or i for i in range(1,101):print("Fizz"if i%3==0 else'')+("Buzz"if i%5==0 else'')or iderp, works better of course
Though I can't find out the score the page to test the code seems to be inaccessible if you are signed in. It just redirects you to the signed in page and the signout link is broken. Still it's a fun and cool idea