You are viewing a single comment's thread. Return to all comments →
Ruby
puts (1..gets.to_i).map {|_| gets.to_i.succ }
Alternately:
puts Array.new(gets.to_i) {|_| gets.to_i.succ }
Or:
gets.to_i.times { puts gets.to_i.succ }
The last is probably most idiomatic.
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Draws
You are viewing a single comment's thread. Return to all comments →
Ruby
Alternately:
Or:
The last is probably most idiomatic.