CT28889

The Reverse Order Beneath Sandspire

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the desert outpost of Sandspire, Mira the accountant keeps careful count of the lanterns. Approve the repair estimates, every figure matters. 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 <= 226; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 11 762213 246821 27717 85731 170515 81866 977802 464510 34052 925238 436366
Output: 436366 925238 34052 464510 977802 81866 170515 85731 27717 246821 762213

Example 2:

Input: 105 943973 25573 958870 763785 880817 262079 96489 885952 134734 594409 218213 943890 458851 645715 531505 850267 775382 17653 613887 450163 475037 204433 415891 829270 180366 866527 594194 470758 681835 194384 606298 579564 40396 333552 500594 268817 504657 589177 906114 441482 587080 460038 628711 400493 361444 324845 222363 888569 248474 778045 8325 591515 959315 659703 321384 354877 179009 834005 584848 559915 135519 884224 699712 247573 712174 254621 451694 670129 287252 816992 431414 165837 761814 485741 539974 217048 195431 215940 696854 937467 15603 413243 92101 481598 852058 718224 610347 219268 444446 415291 84931 882217 484865 233958 454417 146499 481744 40721 128909 813124 924655 934139 446350 146154 737415
Output: 737415 146154 446350 934139 924655 813124 128909 40721 481744 146499 454417 233958 484865 882217 84931 415291 444446 219268 610347 718224 852058 481598 92101 413243 15603 937467 696854 215940 195431 217048 539974 485741 761814 165837 431414 816992 287252 670129 451694 254621 712174 247573 699712 884224 135519 559915 584848 834005 179009 354877 321384 659703 959315 591515 8325 778045 248474 888569 222363 324845 361444 400493 628711 460038 587080 441482 906114 589177 504657 268817 500594 333552 40396 579564 606298 194384 681835 470758 594194 866527 180366 829270 415891 204433 475037 450163 613887 17653 775382 850267 531505 645715 458851 943890 218213 594409 134734 885952 96489 262079 880817 763785 958870 25573 943973

Example 3:

Input: 66 959112 884978 908137 734677 399998 637824 158645 99588 885063 694758 41126 793902 949488 765705 591391 345364 899976 891130 685116 765518 452597 203735 82350 924820 245924 591433 66605 64037 103129 606673 649918 850508 578014 238453 965663 479217 596716 890403 785353 747471 947544 564032 134720 133587 305186 814566 91275 116486 715092 185005 410440 174060 248548 358572 516141 796350 555559 332301 26514 204378 982807 454922 209846 678058 611030 69221
Output: 69221 611030 678058 209846 454922 982807 204378 26514 332301 555559 796350 516141 358572 248548 174060 410440 185005 715092 116486 91275 814566 305186 133587 134720 564032 947544 747471 785353 890403 596716 479217 965663 238453 578014 850508 649918 606673 103129 64037 66605 591433 245924 924820 82350 203735 452597 765518 685116 891130 899976 345364 591391 765705 949488 793902 41126 694758 885063 99588 158645 637824 399998 734677 908137 884978 959112

Constraints:

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

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