This article is created as a memorandum so that you will not forget what you learned while working on the Aizu Online Judge.
name = gets
#Enter Taro and enter
#=>"Taro\n"
name = gets.chomp
#Enter Taro and enter
#=>"Taro"
number = gets.to_i
#Enter 1
#=>1
gets is a string
Concatenate arrays and return as a single string
[1,2,3].join
#"abc"
[1,2,3].join(" ")
#"a b c"
[1,2,3].join("+")
#"1+2+3"
times
1000.times do
puts "Hello World"
end
Recommended Posts