/**
* @param {number} n
* @return {string}
*/
var convertToTitle = function(n) {
var dict =['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' ];
var result = '';
if( n<=26 ){
return dict[n-1];
}
while( n ){
var val = (n-1)%26;
result = dict[val] + result;
n = Math.floor( (n-1) /26 );
}
return result;
};