#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  short n, i;
  long b[10001] = {};
  scanf("%hd", &n);
  for (i = 1; i <= n; i++) {
    scanf("%ld", &b[i]);
    b[i] *= i;
  }
  for (i = 1; i <= n; i++)
    printf("%ld ", b[i] - b[i - 1]);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13890,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x13890(%rbp),%rdi
xor    %esi,%esi
mov    $0x13888,%edx
call   1040 <memset@plt>
lea    0xea4(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movw   $0x1,-0x8(%rbp)
movswl -0x8(%rbp),%eax
movswl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     11ca <main+0x9a>
movswq -0x8(%rbp),%rax
lea    -0x13890(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movswq -0x8(%rbp),%rcx
movswq -0x8(%rbp),%rax
imul   -0x13890(%rbp,%rax,8),%rcx
fe ff
mov    %rcx,-0x13890(%rbp,%rax,8)
ff
mov    -0x8(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x8(%rbp)
jmp    116d <main+0x3d>
movw   $0x1,-0x8(%rbp)
movswl -0x8(%rbp),%eax
movswl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     121d <main+0xed>
movswq -0x8(%rbp),%rax
mov    -0x13890(%rbp,%rax,8),%rsi
ff
movswl -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
sub    -0x13890(%rbp,%rax,8),%rsi
ff
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x8(%rbp)
jmp    11d0 <main+0xa0>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x13890,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x138a0,%rsp
lea    0x10(%rsp),%rdi
mov    $0x13888,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0xe9c(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpw   $0x0,0xe(%rsp)
jle    1202 <main+0xc2>
mov    $0x1,%bx
lea    0xe7d(%rip),%r14
nopw   0x0(%rax,%rax,1)
movswq %bx,%r15
lea    (%rsp,%r15,8),%rsi
add    $0x10,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x10(%rsp,%r15,8),%rax
imul   %r15,%rax
mov    %rax,0x10(%rsp,%r15,8)
add    $0x1,%ebx
movzwl 0xe(%rsp),%eax
cmp    %ax,%bx
jle    1190 <main+0x50>
test   %ax,%ax
jle    1202 <main+0xc2>
mov    $0x1,%bx
lea    0xe37(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movswq %bx,%rax
mov    0x10(%rsp,%rax,8),%rsi
sub    0x8(%rsp,%rax,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    0xe(%rsp),%bx
jle    11e0 <main+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x138a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%hd\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [5 x i8] c"%ld \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca [10001 x i64]
store i32 0, i32* %1
%5 = bitcast [10001 x i64]* %4 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %2)
store i16 1, i16* %3
br label %7
7: ; preds = %25, %0
%8 = load i16, i16* %3
%9 = sext i16 %8 to i32
%10 = load i16, i16* %2
%11 = sext i16 %10 to i32
%12 = icmp sle i32 %9, %11
br i1 %12, label %13, label %28
13: ; preds = %7
%14 = load i16, i16* %3
%15 = sext i16 %14 to i64
%16 = getelementptr inbounds [10001 x i64], [10001 x i64]* %4, i64 0, i64 %15
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %16)
%18 = load i16, i16* %3
%19 = sext i16 %18 to i64
%20 = load i16, i16* %3
%21 = sext i16 %20 to i64
%22 = getelementptr inbounds [10001 x i64], [10001 x i64]* %4, i64 0, i64 %21
%23 = load i64, i64* %22
%24 = mul nsw i64 %23, %19
store i64 %24, i64* %22
br label %25
25: ; preds = %13
%26 = load i16, i16* %3
%27 = add i16 %26, 1
store i16 %27, i16* %3
br label %7
28: ; preds = %7
store i16 1, i16* %3
br label %29
29: ; preds = %48, %28
%30 = load i16, i16* %3
%31 = sext i16 %30 to i32
%32 = load i16, i16* %2
%33 = sext i16 %32 to i32
%34 = icmp sle i32 %31, %33
br i1 %34, label %35, label %51
35: ; preds = %29
%36 = load i16, i16* %3
%37 = sext i16 %36 to i64
%38 = getelementptr inbounds [10001 x i64], [10001 x i64]* %4, i64 0, i64 %37
%39 = load i64, i64* %38
%40 = load i16, i16* %3
%41 = sext i16 %40 to i32
%42 = sub nsw i32 %41, 1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [10001 x i64], [10001 x i64]* %4, i64 0, i64 %43
%45 = load i64, i64* %44
%46 = sub nsw i64 %39, %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %46)
br label %48
48: ; preds = %35
%49 = load i16, i16* %3
%50 = add i16 %49, 1
store i16 %50, i16* %3
br label %29
51: ; preds = %29
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%hd\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [5 x i8] c"%ld \00"
define i32 @main() {
%1 = alloca i16
%2 = alloca [10001 x i64]
%3 = bitcast i16* %1 to i8*
%4 = bitcast [10001 x i64]* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16* %1)
%6 = load i16, i16* %1
%7 = icmp slt i16 %6, 1
br i1 %7, label %33, label %10
8: ; preds = %10
%9 = icmp slt i16 %18, 1
br i1 %9, label %33, label %20
10: ; preds = %0, %10
%11 = phi i16 [ %17, %10 ], [ 1, %0 ]
%12 = sext i16 %11 to i64
%13 = getelementptr inbounds [10001 x i64], [10001 x i64]* %2, i64 0, i64 %12
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %13)
%15 = load i64, i64* %13
%16 = mul nsw i64 %15, %12
store i64 %16, i64* %13
%17 = add i16 %11, 1
%18 = load i16, i16* %1
%19 = icmp sgt i16 %17, %18
br i1 %19, label %8, label %10
20: ; preds = %8, %20
%21 = phi i16 [ %30, %20 ], [ 1, %8 ]
%22 = sext i16 %21 to i64
%23 = getelementptr inbounds [10001 x i64], [10001 x i64]* %2, i64 0, i64 %22
%24 = load i64, i64* %23
%25 = add nsw i64 %22, -1
%26 = getelementptr inbounds [10001 x i64], [10001 x i64]* %2, i64 0, i64 %25
%27 = load i64, i64* %26
%28 = sub nsw i64 %24, %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %28)
%30 = add i16 %21, 1
%31 = load i16, i16* %1
%32 = icmp sgt i16 %30, %31
br i1 %32, label %33, label %20
33: ; preds = %20, %0, %8
%34 = call i32 @putchar(i32 10)
ret i32 0
}