When I run my code in python IDLE it works. But when I run my code on HackerRank I get a ValueError. What can I do?
list=[]
n=int(input())
sum=0
for i in range(0,n):
app=int(input())
list.append(app)
for j in list:
sum=sum+j
print(sum)
Traceback (most recent call last):
File "Solution.py", line 5, in <module>
app=int(input())
ValueError: invalid literal for int() with base 10: '1 2 3 4 10 11'