CT24705

Zoya's Ledger of ledgers

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Zoya the chronicler watches over the tundra station of Whitesnow's stores of ledgers. A careful computation stands between order and chaos. Task: Sort the array in non-increasing order and print it. Input format: First line: n. Second line: n integers. Output format: Print the sorted values space-separated. Constraints: 1 <= n <= 718; -1000000000 <= a[i],x <= 1000.

Example 1:

Input: 33 -58739794 -228490435 -158105573 -942062505 -385270872 -642818006 -775309919 -988689485 -177817765 -792662776 -42802554 -597686899 -198969823 -386190706 -211834257 -933866517 -558746377 -126763006 -270121547 -927549858 -64262103 -684443596 -134250960 -993551143 -535070956 -396474966 -190507335 -254609757 -489359388 -957098841 -115024175 -982455903 -492999538
Output: -42802554 -58739794 -64262103 -115024175 -126763006 -134250960 -158105573 -177817765 -190507335 -198969823 -211834257 -228490435 -254609757 -270121547 -385270872 -386190706 -396474966 -489359388 -492999538 -535070956 -558746377 -597686899 -642818006 -684443596 -775309919 -792662776 -927549858 -933866517 -942062505 -957098841 -982455903 -988689485 -993551143

Example 2:

Input: 223 -803447267 -753774283 -631791148 -676550573 -835702776 -441066592 -841756517 -303706836 -527984621 -966527021 -179241574 -24535817 -308255189 -203266379 -517610430 -32838883 -166858634 -594584920 -473934072 -633538181 -234682360 -772775695 -513592822 -591114821 -609949767 -928794490 -792118186 -414410382 -951584728 -573102132 -569277219 -441380612 -766634013 -316385722 -727043470 -894344304 -319904042 -983564870 -697806318 -198465175 -71526439 -663427879 -912318037 -676754677 -504656196 -488969357 -225522889 -259710636 -303241567 -125939738 -256918636 -263666035 -101462123 -348921264 -959939990 -170549584 -958453495 -856925409 -314234902 -844316674 -208566410 -728207786 -165552285 -830738022 -804562240 -994038200 -238430081 -592519572 -376098472 -590662749 -519509105 -736384862 -522419…
Output: -10925084 -11979440 -14646957 -19989991 -24535817 -28277326 -29545936 -29747772 -32838883 -45746952 -49227987 -51759572 -69381216 -70507464 -71526439 -72504441 -74679545 -85879951 -94677663 -97206971 -101462123 -111612796 -122252732 -124725522 -125939738 -131667075 -133968275 -136615847 -151902932 -165552285 -166858634 -170549584 -179241574 -190988216 -198465175 -201039475 -203266379 -208566410 -211448063 -225522889 -226635636 -227379444 -230509064 -234682360 -237823870 -238430081 -245142895 -245961679 -252562987 -255931813 -256918636 -259099430 -259710636 -263666035 -266667675 -267295314 -281184422 -285087728 -293324391 -299898118 -301822791 -302320093 -303241567 -303592740 -303706836 -304620129 -308255189 -314234902 -316385722 -319904042 -320458902 -321908923 -342742041 -345734479 -34892…

Example 3:

Input: 713 -428042679 -527116990 -368045709 -225246051 -7770508 -843442721 -72263398 -854896729 -82072239 -309957463 -480668700 -138552484 -948591015 -894531383 -949136356 -554594700 -477873641 -618560407 -941592548 -525157485 -697541874 -43713877 -271190782 -744542310 -15793722 -896726800 -338151584 -820943088 -933208493 -677083088 -299181712 -419565291 -224253093 -57246218 -587085418 -524940200 -25088228 -595360219 -807946220 -503682590 -954892792 -283492131 -139549038 -405733479 -472792865 -778457459 -336924595 -797031038 -20125472 -193684095 -708464268 -283664682 -103352597 -296555841 -770738545 -156649608 -850373821 -639199023 -550695529 -309645255 -717893108 -165980278 -923472620 -773310276 -489594391 -115450407 -40434221 -88099910 -180479712 -387464628 -363011152 -604563465 -791473292 -603…
Output: -257571 -3973803 -5254761 -7726862 -7770508 -8540923 -9410519 -12521920 -15156271 -15793722 -16169419 -16520533 -20125472 -21250457 -21816136 -23660694 -25088228 -26932094 -28245272 -29797971 -30590102 -31606966 -32010365 -33579554 -33937226 -37945081 -39501598 -40434221 -41809586 -43713877 -51218142 -52423706 -52697933 -54029737 -57246218 -60039351 -64909000 -64987348 -66055509 -67808317 -70958727 -72263398 -72825930 -72985034 -73924521 -76694639 -76895856 -77550808 -78494720 -80231600 -80708227 -82072239 -83093956 -83663892 -84839688 -85108706 -88099910 -88328408 -91384249 -92244541 -97702445 -97953897 -98994893 -100510688 -103352597 -103999086 -104600189 -108224012 -110306625 -111020985 -112771899 -115450407 -117359119 -117641925 -126450020 -127986513 -129532212 -129593192 -131486258 -1…

Constraints:

1 <= n <= 718; -1000000000 <= a[i],x <= 1000.

Loading...
Test Cases:No test cases
No test cases available.
Zoya's Ledger of ledgers - EASY Coding Problem | CodeTikki