7 lines
143 B
Ruby
7 lines
143 B
Ruby
rice_on_square = 1
|
|
|
|
64.times do |square|
|
|
puts "On square #{square + 1} are #{rice_on_square} grain(s)"
|
|
rice_on_square *= 2
|
|
end
|