CT21457

The Jade Reverse Order

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the shale slopes of Greystone; Quartermaster weighs the day's barrels manifests and starts the calculations. 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 <= 219; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 7 -808261 -391784 -547241 -419409 -458134 -536369 -207010
Output: -207010 -536369 -458134 -419409 -547241 -391784 -808261

Example 2:

Input: 58 -841243 -387148 -461022 -828995 -674003 -830695 -629975 -52867 -132286 -108531 -597921 -727307 -859258 -865372 -552178 -593903 -696583 -105257 -240148 -178552 -768299 -456272 -432866 -885499 -116713 -200281 -777814 -476616 -556292 -19533 -776421 -715787 -895798 -567708 -845768 -359750 -831506 -933608 -812310 -864095 -603715 -214116 -647775 -343595 -452380 -763956 -651940 -879293 -305330 -4757 -628678 -705268 -182018 -637962 -980642 -515367 -310224 -62991
Output: -62991 -310224 -515367 -980642 -637962 -182018 -705268 -628678 -4757 -305330 -879293 -651940 -763956 -452380 -343595 -647775 -214116 -603715 -864095 -812310 -933608 -831506 -359750 -845768 -567708 -895798 -715787 -776421 -19533 -556292 -476616 -777814 -200281 -116713 -885499 -432866 -456272 -768299 -178552 -240148 -105257 -696583 -593903 -552178 -865372 -859258 -727307 -597921 -108531 -132286 -52867 -629975 -830695 -674003 -828995 -461022 -387148 -841243

Example 3:

Input: 95 -667964 -459244 -969456 -683241 -529280 -849462 -200309 -246477 -140798 -500248 -607838 -903157 -287949 -954422 -533240 -241809 -192035 -670961 -661016 -597871 -642219 -151165 -592186 -891099 -227328 -33206 -226876 -185357 -654133 -181864 -23393 -699503 -869493 -92672 -750048 -407903 -441814 -829361 -884756 -715470 -446030 -908377 -45474 -273210 -610977 -696562 -579544 -373947 -257100 -389173 -122716 -558976 -480666 -284387 -2517 -143932 -29110 -431775 -840571 -683316 -331263 -825216 -407474 -982667 -476219 -461787 -854726 -214084 -614819 -993220 -356763 -78638 -493853 -313082 -190740 -814821 -690882 -353214 -777205 -488628 -386431 -840926 -953613 -552454 -942544 -157342 -95393 -44730 -235510 -865673 -5911 -589478 -891095 -202786 -711718
Output: -711718 -202786 -891095 -589478 -5911 -865673 -235510 -44730 -95393 -157342 -942544 -552454 -953613 -840926 -386431 -488628 -777205 -353214 -690882 -814821 -190740 -313082 -493853 -78638 -356763 -993220 -614819 -214084 -854726 -461787 -476219 -982667 -407474 -825216 -331263 -683316 -840571 -431775 -29110 -143932 -2517 -284387 -480666 -558976 -122716 -389173 -257100 -373947 -579544 -696562 -610977 -273210 -45474 -908377 -446030 -715470 -884756 -829361 -441814 -407903 -750048 -92672 -869493 -699503 -23393 -181864 -654133 -185357 -226876 -33206 -227328 -891099 -592186 -151165 -642219 -597871 -661016 -670961 -192035 -241809 -533240 -954422 -287949 -903157 -607838 -500248 -140798 -246477 -200309 -849462 -529280 -683241 -969456 -459244 -667964

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.