• + 0 comments

    my very easy cpp solution

    int beautifulDays(int i, int j, int k) {

    int rem,count=0,temp;
    
    for(int m=i;m <=j ; m++){///for looping
        temp=m;
        int rev=0;
        while(temp > 0){
             rem = temp % 10;
             rev = (rev * 10 ) + rem;
             temp = temp/10;  //for reversing number
        }
    
        if(abs(m - rev) % k ==0){  \\for checking it is equallly divisible or not
            count++;
    
        }
    }
    return count;
    

    }