CT2122

Ojas's Ember Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Legend says the vault under the seal rocks of Barking Cove opens only for a perfect tally of scrolls. Ojas means to find out. Task: Read n integers and print them in reverse order. Input format: First line: n. Second line: n space-separated integers. Output format: Print the n values in reverse order, space-separated. Constraints: 1 <= n <= 72; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 6 -3911 -675048 -684654 -774811 -145873 -252558
Output: -252558 -145873 -774811 -684654 -675048 -3911

Example 2:

Input: 2 -171909 -431082
Output: -431082 -171909

Example 3:

Input: 49 -340804 -313344 -578775 -440999 -491749 -635481 -97253 -846235 -689894 -135680 -815692 -982136 -295205 -464958 -103169 -226563 -238357 -148016 -763038 -66740 -489517 -1289 -383406 -646821 -684636 -395900 -562436 -145816 -435621 -992962 -32716 -772660 -651171 -814951 -498036 -359369 -704149 -290342 -735671 -853686 -301102 -883400 -287343 -567601 -528599 -80357 -294532 -112311 -458086
Output: -458086 -112311 -294532 -80357 -528599 -567601 -287343 -883400 -301102 -853686 -735671 -290342 -704149 -359369 -498036 -814951 -651171 -772660 -32716 -992962 -435621 -145816 -562436 -395900 -684636 -646821 -383406 -1289 -489517 -66740 -763038 -148016 -238357 -226563 -103169 -464958 -295205 -982136 -815692 -135680 -689894 -846235 -97253 -635481 -491749 -440999 -578775 -313344 -340804

Constraints:

1 <= n <= 72; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
Ojas's Ember Ledger - EASY Coding Problem | CodeTikki