Help me in solving SAVKONO problem

My issue

Python error Only

input Test Cases has extra White Spaces …

using input.split() works while using input.split(" ") does not work

i am 100% sure of this …spent 3+ hours on figuring this out …please change it as soon as possible

My code


# cook your dish here
t=int(input())

for _ in range(t):
    n,z=map(int,input().split(" "))
    data=list(map(int,input().split(" ")))
    data=[-i for i in data]
    import heapq
    heapq.heapify(data)
    
    count=0
    while(z>0):
        if not data:
            print("Evacuate")
            break
        current=-heapq.heappop(data)
        z=z-current
        if current//2>0:
            heapq.heappush(data,-(current//2))
        count+=1
    else:
        print(count)

Problem Link: Save Konoha Practice Coding Problem - CodeChef

@xae_abhishek
plzz refer the following python code


# cook your dish here
t=int(input())

for _ in range(t):
    n,z=map(int,input().split())
    data=list(map(int,input().split()))
    data=[-i for i in data]
    import heapq
    heapq.heapify(data)
    
    count=0
    while(z>0):
        if not data:
            print("Evacuate")
            break
        current=-heapq.heappop(data)
        z=z-current
        if current//2>0:
            heapq.heappush(data,-(current//2))
        count+=1
    else:
        print(count)