...

/

Integer Division Without Using * or /

Integer Division Without Using * or /

Divide two integers without using '/' or '*' operators.

Statement

Given two integers, xx and yy, return x÷yx ÷ y without using division (//) or multiplication (*) operators.

Note: Assume that both integers are positive.

Example

Let’s take the example of 7÷27 ÷ 2:

Sample input

Here 77 is the dividend and 22 is the divisor.

7, 2

Expected output

3

Try it yourself

Access this course and 1400+ top-rated courses and projects.