SPOJ Mixtures python input problem problem

Can someone please help me regarding how to take the input in python for this particular problem. Not sure if am doing it right.
Code: https://ide.codingblocks.com/#/s/18694
It is working if I press enter after giving an input say 20 40 60enter.

To take arbitrary number of inputs, you can do :

try:
    while True:
		inp = raw_input()
		if inp != "":
			# Stuff to be done
		else:
			break
except EOFError:
	pass
1 Like