I submitted the following piece of code:

```
class Solution {
public:
string convertToTitle(int n) {
int i = 0;
while (pow(26, i) < n)
i++;
i--;
i = (i > 0) ? i : 0;
char tmp[33];
tmp[0] = '\0';
for (int j = i; j >= 0; j--) {
char current = (char)(n / pow(26, j) + 64);
strcat(tmp, ¤t);
n -= pow(26, j);
}
return string(tmp);
}
};
```

and got the feedback:

Wrong Answer

Input: 27

Output: "AA"

Expected: "AA"

I am totally confused. Please help me. Thank you very much!