0
Can you identity the Error in the program ?
n, x = map(int, raw_input().split()) a = map(int, raw_input().split()) ans = 0 ans = 1 for i in xrange(n): x -= a[i] if x <= 0: break ans += 1 print ans
1 Antwort
+ 6
Actually, it is written for Python 2, while Sololearn's implementation uses Python 3.