#D. 列表3:切片取值

    Type: Default 1000ms 256MiB

列表3:切片取值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给定 n 个数字组成列表,输出列表前 3 个元素、列表最后 3 个元素、列表整体反转后的序列,每组数字同一行,空格分隔。

输入格式

第一行整数 n

第二行 n 个整数

输出格式

三行,分别为前 3 项、后 3 项、反转全部

input1

7
10 20 30 40 50 60 70

output1

10 20 30
50 60 70
70 60 50 40 30 20 10

Python暑假测试(袁)0901

Not Attended
Status
Done
Rule
IOI
Problem
8
Start at
2026-7-17 9:15
End at
2026-7-17 11:15
Duration
2 hour(s)
Host
Partic.
4