Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d521698

Browse files
Create Day 7.md
1 parent 158ab11 commit d521698

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎30 Days of Code HackerRank/Day 7.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Objective
3+
Today, we're learning about the Array data structure.
4+
5+
Task
6+
Given an array, A, of N integers, print A's elements in reverse order
7+
as a single line of space-separated numbers.
8+
"""
9+
10+
11+
n = int(input().strip())
12+
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
13+
14+
# Reverse arr and convert integer to string
15+
rarr = map(str, arr[::-1])
16+
print(" ".join(rarr))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /