チャレンジ
歌詞を99本のビールに出力するプログラムを作成しますが、、「ビール」の代わりに、壁のボトル数が3の倍数の場合は「フィズ」、5の倍数の場合は「バズ」を出力します。 3の倍数と5の倍数の場合、「fizzbuzz」。壁のボトル数が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.
これはcode-golfなので、各言語での最短の提出が勝ちです。