TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What's the shortest FizzBuzz you can write? What language?

8 点作者 jontsai超过 13 年前

2 条评论

jontsai超过 13 年前
I first heard about FizzBuzz from Hackruiter.com and then I got an email from RapLeaf (<a href="http://blog.rapleaf.com/dev/2011/09/06/code-golfing-at-the-office" rel="nofollow">http://blog.rapleaf.com/dev/2011/09/06/code-golfing-at-the-o...</a>)<p>It's a very interesting concept to filter out the bad programmers using something simple like FizzBuzz. What do you guys like to give out as programming or interview questions? How effective are they?
评论 #2981682 未加载
rorrr超过 13 年前
the shortest I could do is 72 characters in PHP. I have no idea how they can do 56.<p><pre><code> &#60;? while(++$i&#60;101)echo $i%15?$i%5?$i%3?$i:'Fizz':'Buzz':'FizzBuzz',"\n";</code></pre>
评论 #2982291 未加载
评论 #2981676 未加载