Usaco 2020 December Contest Bronze Problem2

I am using python 3 and my version of the solution is below:
a=list(map(int,input().split()))
numdaisy=a[0]
leftpetals=a[1:]
num=len(leftpetals)
suam=0
for ind in range(len(leftpetals)):
for w in range(len(leftpetals)):
suam=0
x=w+1
if (ind+x)<len(leftpetals):
for y in leftpetals[ind:ind+x+1]:
suam+=y
for z in leftpetals[ind:ind+x+1]:
if suam/x==z:
num+=1
print(num)
IN my computer the sample test case which is 4,1,1,2,3 results in output of 6, which is the correct out-put, yet when i submit, it says: “Incorrect answer on sample input case – details below Your output (written to stdout): 0 The correct answer: 6”. How should i fix this?
the link to the problem: USACO
Regards,
Soumyadeep

Make sure to format your code with backticks: Welcome to the USACO Forum!

I think the issue is because USACO splits their input into two lines, not one line. You should probably adjust the way you read in your input.

thanks that solved it!