1 2 3 4 5 6 7 8 9 10
s=gets.chomp r=?@ if s=~/\d+/ then s.to_i.times{r=r.succ} puts r else i=1 (i+=1)while((r=r.succ)!=s) p i end