完全一致は、つまらない…と。
str,str2 = gets.chomp.split(" ") #1行で、2要素受け取る。 p str == str2 ? 1 : 0 #完全一致してたら、1でそれ以外なら0。