Hi there! 
You have to implement the 

`String get_column_title(int num) // syntax depends on programming language`

function that takes an integer number (index of the Excel column) and returns the string represents the title of this column.

#Intro
In the MS Excel lines are numbered by decimals, columns - by sets of letters.

For example, the first column has the title "A", second column - "B", 26th - "Z", 27th - "AA". 

"BA"(53) comes after "AZ"(52), "AAA" comes after "ZZ".




Excel? Columns? More details [here](https://en.wikipedia.org/wiki/Microsoft_Excel)

#Input
It takes only one argument - column decimal index number.
Argument `num` is a natural number.

#Output
Output is the upper-case string represents the title of column. It contains the English letters: A..Z

#Errors
For cases `num < 1` your function should throw/raise `IndexError`. In case of non-integer argument you should throw/raise `TypeError`.

In Java, you should throw `Exceptions`.

Nothing should be returned in Haskell.

#Examples
Python, Ruby:
```
>>> get_column_title(52)
"AZ"
>>> get_column_title(1337)
"AYK"
>>> get_column_title(432778)
"XPEH"
>>> get_column_title()
TypeError:
>>> get_column_title("123")
TypeError:
>>> get_column_title(0)
IndexError:
```
JS, Java:
```
>>> getColumnTitle(52)
"AZ"
>>> getColumnTitle(1337)
"AYK"
>>> getColumnTitle(432778)
"XPEH"
>>> getColumnTitle()
TypeError:
>>> getColumnTitle("123")
TypeError:
>>> getColumnTitle(0)
IndexError:
```

#Hint
The difference between the 26-digits notation and Excel columns numeration that in the first system, after "Z" there are "BA", "BB", ..., while in the Excel columns scale there is a range of 26 elements: AA, AB, ... , AZ between Z and BA. 

It is as if in the decimal notation was the following order: 0, 1, 2, .., 9, 00, 01, 02, .., 09, 10, 11, .., 19, 20..29..99, 000, 001 and so on.

#Also
The task is really sapid and hard. If you're stuck - write to the discussion board, there are many smart people willing to help.

Difficulty: introductory

Starter code:

def get_column_title(num):
	

Solutions:
from string import ascii_uppercase as u

def get_column_title(n):
    assert isinstance(n, int) and n > 0
    col = []
    while n:
        n, r = divmod(n-1, 26)
        col.append(u[r])
    return ''.join(reversed(col))

upper = __import__("string").ascii_uppercase.__getitem__

def get_column_title(num=None):
    if not isinstance(num, int): raise TypeError()
    if num < 1: raise IndexError()
    res = []
    while num:
        num, r = divmod(num-1, 26)
        res.append(r)
    return ''.join(map(upper, reversed(res)))

alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

def get_column_title(n):
    if n < 1:
        raise ValueError
    l = []
    while n:
        n, m = divmod(n-1, 26)
        l.append(alpha[m])
    return "".join(l[::-1])


from string import ascii_uppercase

def get_column_title(n):
    n -= 1
    result = []
    while n >= 0:
        result.append(ascii_uppercase[n % 26])
        n = n // 26 - 1
    if not result:
        raise ValueError('Not a valid number.')
    return ''.join(result[::-1])

def get_column_title(num):
    if type(num) != int: raise TypeError
    if num < 1: raise IndexError
    
    abc = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    col_title = ""
    while num > 0:
        letter_index = num % 26
        if letter_index == 0:
            letter_index = 26
            num -= 26
        num //= 26
        col_title = abc[letter_index] + col_title
        
    return col_title.strip()


def get_column_title(number):
    if number <= 0: raise ValueError
    if number <= 26: return chr(number + 64)
    else: return get_column_title((number-1) // 26) + chr(65 + (number-1) % 26)

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def get_column_title(number):
    result = []
    if not isinstance(number, int):
        raise TypeError

    def convert(num):

        if isinstance(num, list):
            n = num[0]
            # result = num
        else:
            if len(result) == 0:
                result.append(num)
            n = num

        if 0 < n <= 26:
            result.append(alphabet[n - 1])
            return result
        else:
            if n % 26 == 0:
                result[0] = convert(n // 26 - 1)
            else:
                result[0] = convert(n // 26)
            result.append(alphabet[n % 26 - 1])
            return result

    res = convert(number)
    result = []
    return ''.join(res[1::])

def get_column_title(num):
    if num <= 0 :
        raise "IndexError"
    elif type(num)!=int:
        raise "TypeError"
    else:
        string = ""
        while num > 0:
            num, remainder = divmod(num - 1, 26)
            string = chr(65 + remainder) + string
        return string
        


def get_column_title(num):
    if num<1: return error
    a = [num%26]
    while num>26:
        num = num//26-1
        a += [num%26+1]
    y = a+[num] if num>26 else a
    if y[0]==0 and len(y)>1: y[1]-=1
    return ''.join(['Z' if i==0 else chr(i+ord('A')-1) for i in y][::-1])


from itertools import count


def get_column_title(num):
    if num<1:
        raise IndexError
        
    if num<=26:
        return chr(ord('A')+num-1)
    
    return get_column_title((num-1)//26) + get_column_title(1+(num-1)%26)