Ruby语言解决某数学难题

(123..327).select{|x| ([x,x*2,x*3].inject([]){|arr,y| arr + y.to_s.split(//)} << '0').uniq.size == 10}

编程技巧