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

29th Jul 2017, 4:46 PM
Prashant Chauhan
1 Resposta
+ 6
Actually, it is written for Python 2, while Sololearn's implementation uses Python 3.
29th Jul 2017, 8:25 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar