CT22003

Farmer's crates Reckoning

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the coral atoll of Pearldeep, Farmer records each crates in a worn leather ledger. The guild wants answers, not guesses. Task: Read n integers and print the largest value. Input format: First line: n. Second line: n space-separated integers. Output format: Print the maximum value. Constraints: 1 <= n <= 304; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 208 870966166 93908090 705566171 77589568 196414507 699656630 330248089 662671972 60675344 916588261 741438498 167858704 960722968 441230343 142313750 225553808 364184277 293381350 853706601 146752362 183667950 455017161 179629029 69128445 184533609 545721504 622145175 680854867 8442549 873946578 902724080 296450020 34313744 460726237 223094037 360129111 949265642 898961761 478823895 208836344 804708199 736319993 573021272 850535164 953896735 161642033 922429153 130652095 605055766 309162223 84502628 146973090 121144180 663456653 521946809 369276673 980606468 427355774 306262126 612258485 738437844 859641688 219798769 480510424 710907203 448091543 758513806 826479185 375599159 66845503 709518674 623347647 652525413 504635094 448709890 900586343 651891296 545934888 362131531 367228907 583466241 438104905 977350920 263886747 451412359 641255114 807443186 266742623 988522549 174470230 686385140 428402106 381913039 966885795 570622989 613475821 817288582 519496567 78386926 42681651 296405615 233267779 645699628 751077818 397567259 927662576 886719980 831954809 149538063 486196078 223903218 916819274 132546703 431284404 492123501 736996114 654933654 942700791 216669791 573556339 571586855 494033207 409422023 43358098 757037048 919602549 890147374 457547576 326601909 361993876 893535115 150051258 815864863 825481451 223654912 243935839 852658798 362714222 942872414 988557795 145866179 79502891 90283934 836552447 321747620 278368382 564849298 365339973 583618691 935042878 446897691 49642720 480127976 684442558 458548711 813259870 961539689 244252648 18588122 444593926 27611044 543616310 325533926 775985313 838358313 466987788 512090272 3554204 290300180 100607129 717017138 538665544 791535892 201486504 724112781 758603041 350967365 974134105 467247136 383885690 788978039 129731586 532254105 411877358 302033894 569601670 15305299 80346138 521610326 884418699 366317511 840458675 355792296 542539045 78241372 383679877 331283659 203007716 183163874 656206946 796838676 338894101 884160372 998183978 374326334 309332192 338678750 148675512
Output: 998183978

Example 2:

Input: 196 674515981 816100168 179668805 141916717 267177657 931575899 360671333 173007147 540162884 183122296 385445579 568019212 469178099 691608083 964172158 417866510 532957946 956620396 82972673 186729101 980057836 532706885 970736777 320827730 971633307 325053500 92771620 797370984 434113257 763741195 396456579 423725332 737243421 521017921 705979426 147564479 140044936 775434809 401587603 660543876 121634914 263746152 50895538 855825373 757989477 557511937 819664055 552062044 81017595 740778740 598124197 891524699 438573558 517492092 724031871 225350605 64045868 68525185 195540994 11187564 630521137 616364411 82791789 111423909 414153646 321512502 177979040 288109683 257296554 607253879 53833095 997866054 341151798 992112824 432585369 139534702 362780663 694633497 775814487 181799188 485752805 523584520 53959028 394399518 597476695 199533743 291652234 488084729 778523478 292011303 135892410 281274968 433588693 385474597 368482692 993352217 454129351 939414426 352530125 168718120 485290400 680546332 553298104 790107129 867924232 852986148 122420859 188868607 990784858 36502851 294644087 821430658 662190332 490794545 616089116 249239869 144595207 927992260 316915877 394846714 591637164 955761372 118422161 278321506 651729524 668800133 330033377 609767957 453507742 377848476 187093915 240891205 90053874 132575055 70154138 699899196 122262546 457222282 317978133 1572475 682268949 766778238 901384251 411194896 393201268 141099248 451244319 824983752 281991540 815385062 288526161 321699854 378508381 509423344 676259461 36814658 296639218 148274536 522563397 211413005 186209124 444728675 25975358 160591541 414831041 53093740 87998844 86742584 928598300 450892823 538826543 780176430 91529351 812293495 390006805 493524130 201952660 982615547 439734629 336841376 326040119 94080837 658280729 609820521 488102235 41873004 113134822 852639175 714225498 345205866 47899510 632548946 383308394 902743800 742638427 246460163
Output: 997866054

Example 3:

Input: 224 167037845 148495294 597237041 157103888 114086080 352049017 329663146 486040083 654586271 921970818 19780136 499512634 636729724 522657932 133794724 631430289 82987408 711153666 730124957 907704817 725950600 546151003 928881264 381867331 420345370 804656987 933856684 367238159 2511638 965430085 922412862 16875985 519036392 661122198 671668255 444608514 614143700 448193078 806075388 201003834 295085243 791028643 396870155 38476500 826124692 205030199 711570748 701940709 373980387 611663655 430854020 979564165 789450548 349724103 65124005 935278581 388268141 635162445 295794033 53913529 585160645 289646897 145996086 79303813 527422098 925857450 215653321 539124349 624902913 428105954 456796540 408179164 2238160 564868370 441408354 365433431 474663713 294345567 705132623 475257409 727588328 815453705 753665312 6900749 536269116 308547402 458123852 412037283 405101418 686332043 546461038 624989027 823833435 525094889 197102351 489781580 504913428 630896819 492744925 633619966 761741107 249212928 146156414 896091528 732334555 123863207 751021714 237893779 30955950 68413099 633131459 205549085 572062067 920474842 148133866 233815980 897973958 770096978 488133414 792547907 668699424 389425938 416280552 338503119 853668081 404917778 16897105 828071873 403038483 503054754 319567014 428718907 640925101 29273595 995860161 152886619 505428255 258267441 801914391 538600908 568139416 292618099 724676434 906712095 260137352 421671344 188798647 816577784 33150704 732771363 956407618 172435500 260751795 992790243 712893580 312657886 321509201 399447588 846157281 818290834 409309064 851789448 276657278 885103888 652828418 784453355 445000975 501822733 476905821 399389433 929444139 759513037 16314745 405123573 456281935 29327461 502463970 484783999 347015070 612159393 784024148 459093118 3614514 302308899 180761005 461106878 950146226 279989887 750217268 874275721 308235129 477255317 273466622 701051086 435394799 812273348 722376156 178388085 471679810 902025444 758899408 615321742 608544980 922967226 934604962 505893392 91175719 55375179 355716616 907409082 470104651 825552605 391169658 642990555 309540263 521819983 430551933 770743447 307769061 183439577 654562594 199228425 796278139 772878540
Output: 995860161

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Farmer's crates Reckoning - EASY Coding Problem | CodeTikki