相似题型:LeetCode 171. Excel Sheet Column Number
代码:
class Solution { public: string convertToTitle(int n) { string ret; while (n != 0) { ret.insert(ret.begin(), 'A' + (n-1)%26); n = (n-1) / 26; } return ret; } };
LeetCode 168. Excel Sheet Column Title
原文地址:http://blog.csdn.net/stephen_wong/article/details/43924501