When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

xerox38's blog

By xerox38, history, 4 years ago, In English

from numpy import *

n = int(input())

b = list(map(int,input().strip().split()))[:n]

c=array(b)

d=[]

for i in range(n):

d.append(sum(c[0:i+1]))

print(d)

. here showing run time error. but why? any solution?

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?