• + 2 comments

    int rc=m%n;

        if(rc==m)
                {
    
                        return s+m-1;
    
        }
    
        else{
    
            return rc+s-1;
        }
    
                i dolike this.
                now why it is not working