Ruby1.9用.プロコンなどで便利かも.
"1 1 2 3 5 8 13 21".split.map(&:to_i)
# => [1, 1, 2, 3, 5, 8, 13, 21]
# 多重代入との組み合せ
w, h = "30 35".split.map(&:to_i)
Go to list of users who liked
More than 5 years have passed since last update.
Ruby1.9用.プロコンなどで便利かも.
"1 1 2 3 5 8 13 21".split.map(&:to_i)
# => [1, 1, 2, 3, 5, 8, 13, 21]
# 多重代入との組み合せ
w, h = "30 35".split.map(&:to_i)
Register as a new user and use Qiita more conveniently
Go to list of users who liked