spoj.pl/problems/HOTELS/
i have problem in taking input as described in problem means taking two input in singel line please hel me how to solve the problem as i am newbie in Python..code is correct as i have already submitted it in C....kindle edit first two line of my code
n=int(input()) #it will read whole line
v=int(input())
s=0;
l=[]
while(s<=n-1):
integerinput=int(input())
l.append(integerinput)
s+=1
maxhere=maxsofar=i=j=k=0
while(i<=n-1):
if(maxhere+l[i] maxhere=max(0,maxhere+l[i])
i+=1
elif(maxhere+l[i]==v):
maxsofar=maxhere+l[i]
break
else:
maxsofar=max(maxhere,maxsofar)
maxhere=maxhere-l[k]
k+=1
print (maxsofar)