def alpha( num ){
def alphas = "A".."Z"
def result = ""
def mod = num % alphas.size()
def next = (int)((num-mod)/alphas.size())
if( next <= 0 ){
result = alphas[num-1].toString()
} else {
result = alpha(next) + alphas[mod-1]
}
result
}
1..100.each{
println alpha(it)
}
genzou
#6539()
[
Groovy
]
Rating0/0=0.00
def alpha( num ){ def alphas = "A".."Z" def result = "" def mod = num % alphas.size() def next = (int)((num-mod)/alphas.size()) if( next <= 0 ){ result = alphas[num-1].toString() } else { result = alpha(next) + alphas[mod-1] } result } 1..100.each{ println alpha(it) }Rating0/0=0.00-0+
[ reply ]