#abc346a. A - Adjacent Product

A - Adjacent Product

Score: 100100 points

问题陈述

给定 NN 个整数 A1,A2,,ANA_1, A_2, \dots, A_N。同时,定义 Bi=Ai×Ai+1 (1iN1)B_i = A_i \times A_{i+1}\ (1 \leq i \leq N-1)

按照这个顺序打印 B1,B2,,BN1B_1, B_2, \dots, B_{N-1},用空格隔开。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

You are given NN integers A1,A2,,ANA_1, A_2, \dots, A_N. Also, define Bi=Ai×Ai+1 (1iN1)B_i = A_i \times A_{i+1}\ (1 \leq i \leq N-1).

Print B1,B2,,BN1B_1, B_2, \dots, B_{N-1} in this order, separated by spaces.

Constraints

  • 2N1002 \leq N \leq 100
  • 1Ai1001 \leq A_i \leq 100
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

NN

A1A_1 A2A_2 \dots ANA_N

Output

Print B1,B2,,BN1B_1, B_2, \dots, B_{N-1} in this order, separated by spaces.

Sample Input 1

3
3 4 6

Sample Output 1

12 24

We have $B_1 = A_1 \times A_2 = 12, B_2 = A_2 \times A_3 = 24$.

Sample Input 2

5
22 75 26 45 72

Sample Output 2

1650 1950 1170 3240

update @ 2024/5/16 17:17:37