/ leetcodesolve / ALGROTHMS / binarysearch.py
swadhinbiswas update on git · 11/9/2024
4beca37
14 lines · 237 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def findesoluction(num1:int,num2:int):
    while(num1 < num2):
        mid=(num1+num2)//2
        count=count+1
        if (number2>mid):
            number1=mid+1
        else: number2=mid

    return count


num1,num2=input().split()