Skip to content

Instantly share code, notes, and snippets.

川村 masakikku

Block or report user

Report or block masakikku

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@masakikku
masakikku / fizzbuzz.txt
Last active May 29, 2019
名前間違えました。
View fizzbuzz.txt
# 標準入力から得られた数字までの FizzBuzz を出力
# 引数に 1 ~ 100 の数値を指定してコマンドラインで以下を実行
$ ruby -e 'raise "illegal arguments. $ {this code} 1 to 100 number argument." unless [*1..100].include?(ARGV[0].to_i); 1.upto(ARGV[0].to_i){|i| out="#{[:Fizz][i%3]}#{[:Buzz][i%5]}"; p out.empty? ? i : out}'
You can’t perform that action at this time.