CT28312

Rowena's ingots Reverse Order

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Caravans arrive at the wren hedges of Thimblewick with crates of ingots, and Rowena the quartermaster must account for every last one. 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 <= 263; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 137 -701496 -552628 -870924 -747680 -309921 -471995 -449709 -883605 -266152 -428748 -832844 -216727 -547452 -766877 -726394 -886734 -880912 -815432 -26297 -193202 -782535 -915038 -624843 -646030 -91462 -778630 -750024 -714858 -772107 -661971 -484023 -740385 -665559 -920153 -438218 -82658 -540066 -705342 -946748 -54897 -680870 -290697 -661097 -89776 -554216 -463456 -308512 -648487 -652061 -62208 -220462 -56851 -151504 -270427 -591429 -382897 -326888 -246053 -837767 -296642 -420813 -31035 -167395 -735063 -224884 -144970 -319657 -674317 -990258 -496265 -201238 -227069 -957347 -528778 -489901 -784995 -614011 -231943 -484592 -983415 -895781 -889898 -216944 -258302 -615483 -225483 -949892 -400590 -262574 -1845 -464098 -407965 -676348 -663456 -641316 -326791 -893944 -456607 -314730 -411913 -69640…
Output: -668060 -920823 -363757 -208339 -727145 -3740 -763957 -739442 -233187 -322474 -262932 -183998 -884379 -338809 -678248 -875824 -425470 -771215 -913795 -584104 -811314 -201321 -440491 -284208 -394547 -317672 -40097 -572010 -590549 -283287 -654643 -387063 -361050 -308618 -992299 -46859 -69640 -411913 -314730 -456607 -893944 -326791 -641316 -663456 -676348 -407965 -464098 -1845 -262574 -400590 -949892 -225483 -615483 -258302 -216944 -889898 -895781 -983415 -484592 -231943 -614011 -784995 -489901 -528778 -957347 -227069 -201238 -496265 -990258 -674317 -319657 -144970 -224884 -735063 -167395 -31035 -420813 -296642 -837767 -246053 -326888 -382897 -591429 -270427 -151504 -56851 -220462 -62208 -652061 -648487 -308512 -463456 -554216 -89776 -661097 -290697 -680870 -54897 -946748 -705342 -540066 -826…

Example 2:

Input: 132 -233217 -226987 -43359 -451672 -852808 -144283 -106785 -809988 -125474 -13943 -526974 -194831 -20534 -309383 -527047 -464315 -576506 -309511 -786958 -830811 -877497 -846585 -385678 -386722 -909345 -407523 -45019 -838601 -513618 -422739 -868868 -483483 -90766 -595152 -118624 -455620 -753933 -755884 -292826 -776400 -548379 -845453 -198069 -465202 -670955 -101212 -43869 -472495 -574737 -780414 -82647 -270052 -815981 -470854 -216118 -861826 -769260 -314125 -606096 -634406 -238054 -320903 -946958 -889000 -894284 -775285 -647041 -938780 -113757 -188672 -929324 -709519 -159691 -176087 -205702 -740587 -859591 -826889 -377045 -601310 -439249 -412340 -585781 -926048 -241833 -281356 -184347 -648466 -268168 -157737 -379478 -424572 -201040 -512777 -428358 -161226 -705717 -253318 -406362 -80316 -236…
Output: -153167 -850278 -355508 -71655 -702892 -2550 -911502 -128908 -774860 -397964 -179061 -338031 -740109 -530281 -25953 -776473 -521910 -626199 -701232 -947336 -815966 -784261 -127612 -154449 -972807 -456102 -289316 -637832 -266241 -883141 -777192 -236224 -80316 -406362 -253318 -705717 -161226 -428358 -512777 -201040 -424572 -379478 -157737 -268168 -648466 -184347 -281356 -241833 -926048 -585781 -412340 -439249 -601310 -377045 -826889 -859591 -740587 -205702 -176087 -159691 -709519 -929324 -188672 -113757 -938780 -647041 -775285 -894284 -889000 -946958 -320903 -238054 -634406 -606096 -314125 -769260 -861826 -216118 -470854 -815981 -270052 -82647 -780414 -574737 -472495 -43869 -101212 -670955 -465202 -198069 -845453 -548379 -776400 -292826 -755884 -753933 -455620 -118624 -595152 -90766 -483483 …

Example 3:

Input: 25 -366904 -52783 -869824 -500146 -715077 -584271 -306388 -593476 -396816 -656828 -923500 -576615 -208778 -516899 -778625 -770541 -685757 -430761 -127268 -867461 -445585 -844361 -668331 -298567 -61371
Output: -61371 -298567 -668331 -844361 -445585 -867461 -127268 -430761 -685757 -770541 -778625 -516899 -208778 -576615 -923500 -656828 -396816 -593476 -306388 -584271 -715077 -500146 -869824 -52783 -366904

Constraints:

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

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