Live data from Hacker News

Fizz Buzz codegolf challenge in 15 languages

hackerrank.com

1–10 of 100 posts

Re: Fizz Buzz codegolf challenge in 15 languages

#3
The obvious scala implementation is 160 chars and works locally, but the site claims I score 0 for it:

     object Solution {def main(args: Array[String])=1 to 100 map {x=>System.out.print(if(x%3>0&&x%5>0)x else if(x%5>0)"Buzz" else if(x%3>0)"Fizz" else "FizzBuzz")}}

Re: Fizz Buzz codegolf challenge in 15 languages

#5
How do you get javascript to work? I tried `process.stdout.write`, `console.log`, but the score is always zero.

Other issues:

- The "Solve FizzBuzz" button doesn't go anywhere if you are logged in, neither does "The Scenario" up top.

- Forum doesn't work (please fill in all the required fields - they already are)

- Signout link doesn't work

Re: Fizz Buzz codegolf challenge in 15 languages

#7

How do you get javascript to work? I tried `process.stdout.write`, `console.log`, but the score is always zero. Other issues: - The "Solve FizzBuzz" button doesn't go anywhere if you are logged in, neither does "The Scenario" up top. - Forum doesn't work (please fill in all the required fields - they already are) - Signout link doesn't work

I'm wondering the same thing...

Re: Fizz Buzz codegolf challenge in 15 languages

#8

for i in range(1,101): print "FizzBuzz" if i %3 == 0 and i % 5 == 0 else "Fizz" if i % 3 == 0 else "Buzz" if i % 5 == 0 else str(i) Scores 69 in python but the login/signup is broken :)

117 is my best Python solution yet, but I'm struggling to get higher than that!
Post reply on HN