挑战
编写一个将歌词输出到99瓶啤酒的程序,但是如果墙上的瓶子数是3的倍数,则输出“嘶嘶” ,而不是“啤酒”,如果是5的倍数,则输出“嗡嗡声”,并且如果“ fizzbuzz”是3的倍数和5的倍数。如果墙上的瓶子数量不是3或5的倍数,则只需照常输出“啤酒”即可。
歌词
99 bottles of fizz on the wall, 99 bottles of fizz.
Take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
97 bottles of beer on the wall, 97 bottles of beer.
Take one down and pass it around, 96 bottles of fizz on the wall.
96 bottles of fizz on the wall, 96 bottles of fizz.
Take one down and pass it around, 95 bottles of buzz on the wall.
95 bottles of buzz on the wall, 95 bottles of buzz.
Take one down and pass it around, 94 bottles of beer on the wall.
....
3 bottles of fizz on the wall, 3 bottles of fizz.
Take one down and pass it around, 2 bottles of beer on the wall.
2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of fizz on the wall.
这是代码高尔夫球,因此每种语言中最短的提交内容将获胜。