[ create a new paste ] login | about

Link: http://codepad.org/sOOEqPjp    [ raw code | output | fork ]

Ruby, pasted on Nov 2:
1
2
3
4
5
6
7
8
9
10
# num = gets.to_i # to get the user input
num = 65535
res = ''
abc = ('A'..'Z').to_a
while num > 26 do 
  res += abc[num%26-1]
  num = num/26
end
res += abc[num%26-1]
print res.reverse


Output:
1
CRXO


Create a new paste based on this one


Comments: