@@ -0,0 +1,635 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%0Aclass Solution(object):%0A%0A    def convertToTitle(self, n):%0A        %22%22%22%0A        :type n: int%0A        :rtype: str%0A        %22%22%22%0A        chars = %5Bchr(i) for i in range(64, 91)%5D  # A is 65%0A        chars%5B0%5D = 'Z'%0A        ret = n / 26%0A        rem = n %25 26%0A%0A        rl = ''%0A%0A        while ret %3E 0 or rem %3E 0:%0A            rl = '%25s%25s' %25 (chars%5Brem%5D, rl)%0A            if 1 == ret and 0 == rem:%0A                break%0A            if 0 == rem:%0A                ret -= 1%0A            rem = ret %25 26%0A            ret /= 26%0A        return rl%0Aif __name__ == '__main__':%0A    print Solution().convertToTitle(2626)

add excel-sheet-column-title