case:1
max = 0b=["1","3","100","1000"]b.each{|key| len = key.to_s.length (len>max)?(max=len):()}b.each{|key| puts "0"*(max - key.to_s.length)+key.to_s}
case:2
15.times do |i| puts sprintf("%02d\n",i)end