yukicoder No.164 ちっちゃくないよ!!
感想
それぞれ、(含まれている数字の最大値+1)進数で最小。
str.to_i(n)で文字列をn進数にできてruby凄い。
n = gets.to_i a = [] for i in 1..n a.push(gets.to_s) end t = 0 dic = {} for s in "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".chars dic[s] = t t += 1 end ar = [] for i in 0..n-1 ar.push(a[i].to_i(dic[a[i].chars.max]+1)) end puts ar.min