CT998

The Verdantstep Reverse Order

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The inventory keeper Zia has been asked to settle a dispute between crews. On the desk lies a long table of scrolls readings. 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 <= 87; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 12 -503494 -209939 -99977 -706322 -466764 -642515 -927318 -628136 -753864 -704734 -669540 -498394
Output: -498394 -669540 -704734 -753864 -628136 -927318 -642515 -466764 -706322 -99977 -209939 -503494

Example 2:

Input: 1 -539076
Output: -539076

Example 3:

Input: 57 -704650 -51417 -995870 -358756 -50926 -600776 -460278 -860058 -425614 -234569 -639537 -398023 -96933 -787144 -944665 -144911 -159561 -539740 -777225 -785774 -292552 -488725 -250743 -719469 -143850 -297000 -994514 -43468 -55635 -649117 -475060 -61735 -878533 -603330 -232574 -342689 -770744 -846897 -751168 -842669 -692159 -955344 -242659 -398891 -899263 -605572 -600670 -383986 -879577 -733805 -978385 -740389 -828691 -829808 -367618 -306879 -122839
Output: -122839 -306879 -367618 -829808 -828691 -740389 -978385 -733805 -879577 -383986 -600670 -605572 -899263 -398891 -242659 -955344 -692159 -842669 -751168 -846897 -770744 -342689 -232574 -603330 -878533 -61735 -475060 -649117 -55635 -43468 -994514 -297000 -143850 -719469 -250743 -488725 -292552 -785774 -777225 -539740 -159561 -144911 -944665 -787144 -96933 -398023 -639537 -234569 -425614 -860058 -460278 -600776 -50926 -358756 -995870 -51417 -704650

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Verdantstep Reverse Order - EASY Coding Problem | CodeTikki