• + 0 comments

    There are two types of people: Type 1:

    #return min((p//2), ((n//2)-(p//2)))
    '
    Type 2:
    '
    listi = []
        for i in range(0, n+1, 2):
            listi.append((i, i+1))
        for i in range(len(listi)):
            if p in listi[i]:
                front = i
        back = len(listi) - front - 1
        return min(front, back)