Doubt in Traverse problem of Innerve's summer code challenge.

Where this logic is giving wrong answer???
Traverse problem of innerve…

while(t--){
scanf("%d",&m);
if(m%3 == 0){
    printf("%d %d\n",m/3,2*(m/3));
}
else{
    double n=m;
    i=ceil(n/3);
    j=i-1;
    while(j<2*i){
        if(i+j == n)
            {
                goto label;
            }
            j++;
    }
    label:
    printf("%d %d\n",i,j);
}

}
return 0;

@jaina15 Your code is working fine.
check out here: https://www.codechef.com/viewsolution/15220747
Just copy and paste.

//