Excel Column Title Problem

Excel Column Title Problem — ExecCode School DSA Practice

Solve the Excel Column Title problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Given a positive integer, convert it to its corresponding Excel column title representation. Your task is to solve Excel Column Title. For example, 1 becomes A, 27 becomes AA.

Examples

Input 1; Output A. Input 28; Output AB

Constraints

1 <= n <= 10^5

Practice Excel Column Title free on ExecCode. Browse DSA problems, topic map, and placement guides.