重複する数字を表示(Rubyの場合)
number = Array.new File.open("../data_a.txt","r"){|f| f.each{|line| (line.to_i != 0) && (number << line.to_i) } } number.sort! 1.upto(number.size-1){|i| (number[i-1] == number[i]) && (p number[i])}
number = Array.new File.open("../data_a.txt","r"){|f| f.each{|line| (line.to_i != 0) && (number << line.to_i) } } number.sort! 1.upto(number.size-1){|i| (number[i-1] == number[i]) && (p number[i])}