Google hashcode Error

I m really new to hashcode. I don’t know
How to submit my code. This code below gives no error in the native compiler but gives in hashcode. What’s the issue? How to submit it? Should I need to rar it with any files? Thanks in advance.

s=list(map(int,input().split()))
n=s[0]
m=s[1]

a=list(map(int,input().split()))
l=[]
total=0
count=0
for i in sorted(a,reverse=True):
if(i+total>n):
continue
else:
l.append(i)
count+=1
total+=i
if total==n:
break

print(count)
l.sort()
for i in l:
print(a.index(i),end=" ")