Help With it Last two not showing Propely


#1

public class Solution {
public String convertToTitle(int A) {
StringBuilder sb = new StringBuilder();

    int i=0;
    while(A>0){
        int k=A%26+'A'-1;
        char c = (char)k;
       
        sb.append(c);
        A=A/26;
    }
    sb=sb.reverse();
        return sb.toString();

}

}