TALAZY Error with previous answer. Don't know why

I can’t find the reason my previous answer didn’t work on this question. My code is:

t = int(input())
for _ in range(t):
    n, b, m = map(int, input().split())

    faltam = n
    tempo = 0
    while faltam:
        if n % 2 == 1:
            n += 1

        done = n / 2
        faltam -= done
        n = faltam

        tempo += b + (m * done)
        m *= 2

    print(int(tempo - b))

I got AC when I did:

t = int(input())
for _ in range(t):
    n, b, m = map(int, input().split())

    faltam = n
    tempo = 0
    while faltam:

        done = (n + 1) // 2
        faltam -= done
        n = faltam

        tempo += b + (m * done)
        m *= 2

    print(int(tempo - b))

Thanks in advance