Why does it display run error on submission

It works perfectly on compilation, but shows “run Error” on submission.Please look at the code below :

p = int(input())

for k in range§:

n=int(input())
buildings = list(map(int,input().split(" ")))
top = buildings[0]
count=0
for i in range(n):
	if top<=buildings[i] :
		count+=1
		top = buildings[i]
print(count)

Hello @dev.sagarkhatri python codes are actually slower then the c++ programs and the test cases are larger so that can be the reason.

because for larger test cases it can give error.
We have asked many students to learn one language for developement and one for programming it will be good for you all.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.