https://www.acmicpc.net/problem/10539
count = int(input())
sequence = list(map(int, input().split()))
rlt = []
for i in range(0,count):
rlt.append(sequence[i]*(i+1))
new_rlt = ""
temp = rlt[0]
new_rlt += str(temp)
for i in range(1,count):
new_rlt += (" "+str(rlt[i]-temp))
#new_rlt.append(rlt[i]-temp)
temp=rlt[i]
print(new_rlt)
리스트의 sum 메소드를 이용해서 풀었군염!
방법#1
N, B = int(input()), list(map(int, input().split()))
A = [B[0]]
for i in range(1,N):
A.append(B[i]*(i+1)-sum(A))
for i in A:
print(i, end='')
방법#2
N, B = int(input()), list(map(int, input().split()))
A = [0 for i in range(B)]
A[0] = B[0]
for i in range(1, N):
A[i] = (B[i]*(i+1) - sum(A))
for i in A:
print(i, end=' ')