Buggy python submission (verdict: Runtime Error):
from sys import stdin
import numpy as np

if __name__ == '__main__':

    N = int(stdin.readline())
    # A だけどNUMPYにあわせてｂ
    b = [int(x) for x in stdin.readline().rstrip().split()]

    # [NumPyで全要素を同じ値で初期化した配列ndarrayを生成 \| note\.nkmk\.me](https://note.nkmk.me/python-numpy-zeros-ones-full/)
    A = np.zeros((N, N), np.int8)
    for i in range(N):
        if i == N - 1:
            A[i][0] = 1
            A[i][i] = 1
        else:
            A[i][i] = 1
            A[i][i+1] = 1

    B = np.array(b)

    # [\[Pythonで数値解析\]\(第5回\)連立一次方程式の数値解法 \- Qiita](https://qiita.com/Y_F_Acoustics/items/b386ff8da11e2c912712)
    ans = np.linalg.solve(A, B)

    int_ans = [str(int(x) * 2) for x in ans]
    print(' '.join(int_ans))


Fixed submission:
from sys import stdin

if __name__ == '__main__':

    N = int(stdin.readline())
    A = [int(x) for x in stdin.readline().rstrip().split()]

    tmp = list()
    for i in range(N):
        if i % 2 == 0:
            continue

        tmp.append(A[i])

    X = list()
    X.append(sum(A) - sum(tmp) * 2)

    for i in range(N):
        if i == 0:
            continue

        X.append(2 * A[i-1] - X[i-1])

    print(' '.join([str(x) for x in X]))

Buggy python submission (verdict: Runtime Error):
from sys import stdin
import numpy as np

if __name__ == '__main__':

    N = int(stdin.readline())
    # A だけどNUMPYにあわせてｂ
    b = [int(x) for x in stdin.readline().rstrip().split()]

    # [NumPyで全要素を同じ値で初期化した配列ndarrayを生成 \| note\.nkmk\.me](https://note.nkmk.me/python-numpy-zeros-ones-full/)
    A = np.zeros((N, N))
    for i in range(N):
        if i == N - 1:
            A[i][0] = 0.5
            A[i][i] = 0.5
        else:
            A[i][i] = 0.5
            A[i][i+1] = 0.5

    B = np.array(b)

    # [\[Pythonで数値解析\]\(第5回\)連立一次方程式の数値解法 \- Qiita](https://qiita.com/Y_F_Acoustics/items/b386ff8da11e2c912712)
    ans = np.linalg.solve(A, B)

    int_ans = [str(int(x)) for x in ans]
    print(' '.join(int_ans))


Fixed submission:
from sys import stdin

if __name__ == '__main__':

    N = int(stdin.readline())
    A = [int(x) for x in stdin.readline().rstrip().split()]

    tmp = list()
    for i in range(N):
        if i % 2 == 0:
            continue

        tmp.append(A[i])

    X = list()
    X.append(sum(A) - sum(tmp) * 2)

    for i in range(N):
        if i == 0:
            continue

        X.append(2 * A[i-1] - X[i-1])

    print(' '.join([str(x) for x in X]))

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
import numpy as np

if __name__ == '__main__':

    N = int(stdin.readline())
    # A だけどNUMPYにあわせてｂ
    b = [int(x) for x in stdin.readline().rstrip().split()]

    a = list()
    for i in range(N):
        tmp = [0] * N
        if i == N - 1:
            tmp[0] = 0.5
            tmp[i] = 0.5
        else:
            tmp[i] = 0.5
            tmp[i+1] = 0.5

        a.append(tmp)

    A = np.array(a)
    B = np.array(b)

    # [\[Pythonで数値解析\]\(第5回\)連立一次方程式の数値解法 \- Qiita](https://qiita.com/Y_F_Acoustics/items/b386ff8da11e2c912712)
    ans = np.linalg.solve(A, B)

    int_ans = [str(int(x)) for x in ans]
    print(' '.join(int_ans))


Fixed submission:
from sys import stdin

if __name__ == '__main__':

    N = int(stdin.readline())
    A = [int(x) for x in stdin.readline().rstrip().split()]

    tmp = list()
    for i in range(N):
        if i % 2 == 0:
            continue

        tmp.append(A[i])

    X = list()
    X.append(sum(A) - sum(tmp) * 2)

    for i in range(N):
        if i == 0:
            continue

        X.append(2 * A[i-1] - X[i-1])

    print(' '.join([str(x) for x in X]))