From f0e5a71c849b13bbfd243906f4d37a1373787323 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Fri, 1 Dec 2023 01:10:18 -0800 Subject: [PATCH] day one part one --- one/.gitignore | 1 + one/Cargo.lock | 7 + one/Cargo.toml | 8 + one/input | 1000 +++++++++++++++++++++++++++++++++++++++++++++++ one/output | 1 + one/src/main.rs | 20 + 6 files changed, 1037 insertions(+) create mode 100644 one/.gitignore create mode 100644 one/Cargo.lock create mode 100644 one/Cargo.toml create mode 100644 one/input create mode 100644 one/output create mode 100644 one/src/main.rs diff --git a/one/.gitignore b/one/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/one/.gitignore @@ -0,0 +1 @@ +/target diff --git a/one/Cargo.lock b/one/Cargo.lock new file mode 100644 index 0000000..f655c3c --- /dev/null +++ b/one/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "one" +version = "0.1.0" diff --git a/one/Cargo.toml b/one/Cargo.toml new file mode 100644 index 0000000..dcf4350 --- /dev/null +++ b/one/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "one" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/one/input b/one/input new file mode 100644 index 0000000..f888ae8 --- /dev/null +++ b/one/input @@ -0,0 +1,1000 @@ +8eight1 +98126 +fourfourthreehnbhkmscqxdfksg64bvpppznkh +8fivenvvtrlj +six3zbhvrfhsevennine +427nine6chnqrssxfour +threevvxhvx38rktdqm3 +eightzgqzr3eight +xgjjmnlvznf2nineltmsevennine6 +ninethree15seven +37cjnsfbfkqpkxpdvgk8 +sgeightwo3 +9sbxg +1spnthree59ninejjgjdlx +six9six2gxmn +twothreefdbl6five3zcqvcqxkcvdfkl4 +46six47seven27one +four15 +7sixvmsrrzqnngonethree +3fvsghvkqkbfivenine +zhthfghk6ppc48bdx6two +1fouronesixsvhbglmvxx +7lcsixmzmseven +two37sixccrpqngpvthree +86fivelqmlmbnhq +bvcz4 +6fivendr7seven31nine4 +jmkhtgklhpxxblc2slhlnfkoneonefour +8smpnsc29threesix +r795vgnhqhs92one +eightfive6 +4threeqzslpcvkpfdjh +8cthp65 +twoonenine87 +dzttdmpfxtnine6onefourone3vnnz +8tnnfrsdffpthree67xh +seven5seven27hf +3sevenone +seven9foursskfhnchhf481 +vrfbrcsgp81vsztr +six9dnqqgxtvrngpz7879two +lkvzzdxmr71lglsixfour +two6jkpz9 +1sevenpmjfv +nlvrdmdhxsix7three7frmdlckfjninesix +gfb89qrhtzsfvbnpbp6two +f8mbbtzjvrqkrszlgrlzrlrgmbmmrdqv8seven +sphkkpptpvjzbflkzz2vbndc3foureighttbn +eightnine5zpbzhltpmsxrggdcmbrzkvczqbfsevendtjsr +2snpbrhpnine3sevensevenhftpqgk5 +seventjxr91sevenseveneightwojf +1hfkvhjxrtjfivefive +3fxgmlxtwo +stwoeighttwo3 +eight45t +sixthreecdhbfive3sevensrskjm +fiveklmj94sixlhpfztlk95 +fivefive6 +fiventjm7tndhd57 +teightwo87nine83 +6jskjmxrttwo93four7 +dftzgsdc19threesevennine3twonevl +zmpcgkonethree1cspnkkpjr9 +hmsfrjtxpgn9dqkr9dqvrtq4 +3eightmfggjleight +qfglzvvrrtpfl4 +7eightonefpqq3 +tgtbsmpftwo4hvnvsixfrdqbvqbhspcczfhvqcslvfszvrtzbks +twofivesix34nine +dhlhkjcjsbgnxd6sgrdnzchtxtplltbqlk +oneonegcndlfourdngmbgdeightsix2 +twotj9l8onetwoned +jpz2fourjgrjzf44 +9fivesixmlqr8rxqpvpfzfive2nine +6xkfkrfnine196 +four7gppqtzvbftzcbzt8nqq1nineqdlrff +2threekxgcqjzt4qdbthmjx +three61eightrnkckq +9knfvqgmdsmdqlkfzl +mxsqv6twojgmhpmlfq +7fouronelngndbsmljbfzmsix +fjm8fdpnlldlgvkqdcdcdjpxzdt +7five2 +tsp9seven +eight2hzpkpqrjgcrnxksix +jfourcgjbpzbgdn61dzqbgthree +7threefive +1ncmzhqghthree3sixllvknhf +one5six9 +krzkzmbccr1 +74mqnzmqnf6 +four9pfhjktmvxtwo +6bl21bpx2 +4threefdpfqck +jjksjbsjlgdonefour5 +2hbthreegfh1 +threegzbn1four4hbqkmtmoneightrhg +fiveeightnine83 +3five49jvrhvmnjmmzlzmhpbpsfpn4 +3vvhshsixone3 +55three7svtlzzggkqjhjx +fxdmnjsvpjbg69gcknlzgrqhqdsxvk3p +eightfcnmbzl2jhlklgmlmsevenkjbgzhstwo +6sevengdmtlfjmns63 +ktgqthreedfmrpdvnkfvs3jsgcvtdkh +4seven1 +34onexkninex6pnldxrfs +threenine3five9eightrvg9 +xqbnmtrlsjninenine57rpcsjpqfdcbd6 +216two +xhrdmfcvjzt4sixfkjsvkfhtldfqckj +2six8zeight1 +cmpklgjgf19twoqstfhphbxxtfdgj2 +lvgqnkqhltwo9r +twosevenfive2rgfsgmzqjbnine +7ddpjxmfschtqdgnjqc18one +oneninefiveeight6 +qs4five5 +rpxbcff9vpmlvvrlonefourdnczqzjbvnine3 +7592r3qjtwothree +sixtwoninegzrfp9hq6six9oneightp +f8seven1dcrjqchxchfour8 +bnhmfmsbzbhfive1rfqqkzkptjnnxpone2jqhrfnvkfk +qlhpvzdkcfsq84 +dfour5one +hcvxnfm32kpzxkhvmvkjsevenllpjpgdhl +dlhhnk2ctvxqmbmsc9five +one7sevenninesix +two4rkb5sixtx17 +28three7 +msixeightnqmtfmtftsix9 +zff8nineflfpz1six1 +vk9 +86ninelzskddf9784 +mrntnhjrvkjgmntone715ktgb7 +sevensixthreegkldpptbmteightsix2nfnljvkfkgc +nineonenine3ssnjhkhdplvq3six +jrdgsz8 +5nine6bglkndgfnineq +nineone8seven5zhdd2eight +17qjzvtwo +4rncnvtp5ssznhncdnnzndr9 +6srf +5two6xxkzdrbfsix +five314sevenseven +eightsix7lhfqone +gdz3one +6sdplqg +rsnnm3twoqlxjjvzeightvxszxhmnck +7onelvrtdktmcmrm55 +1eightzvcgfqgfh +ssgrzpb6jntxrdhvmrkeight +5oneninetwo +gjktwopxxql4gxfourseven9 +four55sevenvglcrqsdt +nsqrjfhs2eight +seventhree5g9 +threehvmrmvglvvsix7pqxzfjvv +cfgfmgg5vmqnnqrxdxone35 +two2fxsmdjmb +rrlxrkjkxmfrbvxsevenrlllvclhvvfourlp4seven +djdoneightthree82eight6five6 +two4threecdbgnmzvdd53oneeightkmx +one5qdtnrpcmrnnsbeighttwotwoninegtpv +86htqkfrkmone217 +onelqd5jvlbm4 +eightone3rpnkglzfcveight12one +fourqfxndmpgbqrcpclbnn86hxsxqrrkjcgtgxbdxjdjlzcrhkp +1one18tjcsjzpmzmpmstzmcn9 +threesevenpgt3 +four9sixthree1 +twoninethreesxxqgqlqmqxkmkl2qdrqpftwo +seven678 +two29six958kqxq3 +dbpjzgdrhnsixfjvs9eightsjdgtckdtsjmhplkjeightwodd +7fourninenine +fourthreedlhf9rf +mjkvfivekltmfourone2 +7twozrrtg498one +4eightcxnx +one62eightdktgeight2five +bnpxcdxpzp4tklvsm +d8sixninegrbx +threefourfivetwo23 +nine3onemqtbrhlp8jqslv66ssjrkh +1four9fournine2 +xfsl83two4 +65twonine +1twofivevctxpfvr18 +819gc4six79 +27vtvmsix1phzrone2nine +boneight1mskkndkgfive +1xmpkmg3 +one8sixthree9zjtmqjjjtc1nine +six36gqjctdsevenlnmmbr7dplrsdptwo +8jjvgmffgxr5 +fivehgkc5 +2qmbvphfivexggrxljhj9qmjrzmrx8eight +3rndntwoseven +boneight6tworgxffournine +htbvm1grtsgdgbl +1hkndcqv +32sl9six9 +894 +vrhxnstqqmflm6glgfnpfour +5ninekrfivesix8 +5six5 +eightpdzjhvbgm5oneonetwothmnkflz +vnfttnhcs892rmpvjvqvfftmzlkcrzthkbhfour2 +9twoeight +73553bkzzhq +fvxmvs47 +3bhmjpqvzs +pcftqc671 +sixtwo8 +threesdhhzmxtzpsfgs286nmqpvrtkbktcblqqb +7pmhlfcmdxthree11gxpncfqntjtwoone +8fivel3sevenxqtpxjntbjbtxhxtqdfnfour +6seven72zzseven +seven9kcthreetwo2five7br +kvkhl1fzvpseven +5oneoneeighteight6 +lvfx6onefour +ftjzq4 +slbgthc5xsxvplbskk +64nkjjvrmsqzdone +twoonelgcnrmrm52 +gnfmrdkzoneseven7twotxgsjsix1one +1xlrpbbdbdgftkd +8jmphpvclbf87two +724threesixthreetwozsix +bcxdnrd91cprdfcqfive +zxjcgbhfr3 +scfklbckxjggbgz9txqnzf6 +1twohctsdfkgsdteight2 +7threethree +jdj9 +99 +sixfzv24nine2bz +onefour1frf79tcfjchqeight +onethreenkgjgtpxfkmncvmsqs2bsqppgg +fourfourtksqrmnmqfour351lrsnv +6559hthdpeightkfive3 +sixone7 +eightoneeightjcsggnqthree5qqmp +sixeightonegltz7 +three4plz3kls +8sixmssvtthreeseventhreenskzq6 +tbzxjqxkspseven9dtbqvchseven8mbpznrrh1tdmqs +1b7eight +thk23eightfivekvzphvmsfour +7cnlrjzvk66threefxzrtgrbvmbp +bhvponeonefouronedcstbnl8 +eightninesix4fourbrpfp +four29eight +kqh5zkgqphzjvz +4zvh +fivesixnzbsvfjhj2 +rkrnbpsqjdthreez78mg +eight4gzxfdjpnjnskzghlzfdmjhz +seven8fourxzdmlcq1mnine7qbblrqtrsq +gd369 +hgtqgfive8 +pcbgddgvvzpmone4onethreeoneonefive +95nnjhmhrqgkkstwo66 +723sixone9threefiveone +threekfvqsscfjr8 +3vzltxllq65jvthree +4977d +35pgnlsjjpbgseven33 +g25twonineeight +three8eight3six +8five8vjnzglnrbsbxmjqzfvrsoneightlpx +3bksdkncgtmdrlvkgboneffkszhfive8 +five1hfh6 +fourfoursix2nine9t +6onetkhqqonetwo +26hdfljh8 +6onethreefvgnoneoneninefour1 +jghct6rzcbjsfivefourtsrbsjkgmtfive +nine93eightxqknsqhrmjthree2 +fivenine44sixsixlxdkpm +threeeight16jjhdkbhlninekvdvlpbq +onethpbzthhlqxnlrmtwo8 +seveneight1eight +5two8 +4four8vdpmqvf3onenmfg9 +eight9jtxgdzdrtwovznpmnqvnnlffsix +456four +9hxkq +713kthreexfbdrtbx +1five59 +1mxpmfive63 +sixfour1ffivezjj +97eightthreecjnxblrnine +kgqcxfzc4sixnineoneone3eight +9fbklklqqsfourbfhmfmgnbtls3three +xxjnbdxzeightjqvvd82kfchrthmgkfive +zfdeightwokbq3seven +6four696ninezfhrbg +zrznfshdvlxcstqtghjnjvxq1dlklzghbh +steightwoxfbfzlnzvlj7919four +nine48oneeightseven89five +ninesxtdnjkmg7rn32qdljqprj3 +five6xkcg1qmpkddfbsnlhzltlqqjr8 +99sgptmns4five +2ninejdstk +gvclfcg9 +n9lmv +jrftwo3 +sxrxlnvdhr47dppck +jvtwonesixlzdshrfjtzgqddsix7 +7peightoneeightwobsc +three6txdjgqqmsdeightcxmljmmzxksseven +fqpx9three96xrvjvjjnrhknsvfour +9fournjmslzbmx34cnt +f3twovfc +shbtwone3kzdsdrxgr +4five1tfhvd27 +rdccbvkr9gjsmxhfdzgvjcbkdmsdeightlvjkdgtdqmbvscvhpmdz +pzsqhqthreetwo1qxfbhreight +threeeightxonenineninepmjfgzsdhd1 +nine7sevenone +hbsqqtlqcxkjjccmmpv5 +6nineltr5plmbgzfqbxninerxzbzrblmfsmjggvr +5eightwolxp +5cscpfqm +four3nthbmbxfbvtrqqkfmltmtjh +pvxtx89jp9onesevennbxmjlzmfk +threetwoeightzcgkbv1 +7rxxfpgvl3eight8dmhkf +nine6two +tpnr21five1eight +ktsx6threeseven +8four31drvszglmv +fgkmbcgsrjgs6eightfivefqqdksrndrtdbsxgmfgtggmrc +sixnineninefzvthdq5tkzrhrgdqblzndmv +7lfdrntqsm +seven8dgxgqvgvmtdkhqsfkhtqcjpvqlfnine +znltfour6twopsdmcthree +oneeightvvvxxptmk4eight2n +5six1jmmqtknpveight +eightsixxxpbvqhpknz27mqxvf +rbdchcmqhseightnine9 +944five8gxsjf98 +smdhcnbmone9 +one64six +seven4fivesevenfournine +fivetjt27qqxncqcone +five49655onet5 +mlqgmhfgsix3two2 +jxdfkbvdgnjqznineh1rdqsv7 +fqdvcktwoeightsixsevenkkczb3 +3krndk27 +qjpmscfqf2gzgvzgksc +5zs11fourqqzfour +5h +fourtjzxtgrtd2twokrkpfm +fourgxprrlvmhgpggsmzbone7 +ldbprdzrqkgqkx23pjvgrc6 +ninevfh2seven4four +23gfmpvvsrjr4vlntkxkeight +sevensixonefivefour9two +vmchfrmfntwo3sv1twoonenngblvmjsf9 +sqhzppseven79kzdppfnk8foureighttwo +1ljltwo8xhszxqmtponethreesevendkx +4fourfive +5fpzhcd7pmbcxcrkp +cdhqgkhfive61seven +eightqtzrscqhr3 +brrftwothreethree1 +r145pbthqtvxd63 +ninebdnxdvchzf57oneightpp +7one1three68 +five8nknine341msfflpnz +sixxmsevennm6 +2n5cdvvtghfg2lmfrbjbvtwothreefour +39one16 +l3two +xsmtghfiveonesix6lkzfgq4threethree +6onettqbfp +nhxlqqp3vkcgsjgkgmjrpll +xgbzrtkbthbfour7mptxqnbrkvhninetwo +7foureight55cvpgsvsr +3twonine +gsqhbhfrzfour9twovjjbskdonegseven4 +2fourthreedcxrcmjmkprdsbone5one +519955six +two8fjgvtwo7vnttwo5qzlgxcfkz +rvk4eightthree +9six6 +clpxqfn3kcn3 +1pzbkzdn9sixxlq89tcnm +nineninetwogtsjfour2twollrrllvk +three5ql7hdjkxdbrcqsfouronekqhc +ltgeightwothree5ccxbhssxrsbj +42three3 +dkmm8eightnine4five +vqmvzpb9tmmsfgscfive6mtjjbleightfour +ms39zmtbptwofive +4xxxkdxlhjjx +6p +threejfqfjhxp9txlrlrbczdxzpmrkz9sevensjlgstbpffhtb +three2zqtrtpzvsffdkjsevencjmrdqthree6three +two681 +fourlhcsspzf5fivezgzkclbrdrqdjcksfive8 +ss3 +znrzctdlgjpzszsixzssrfpcvhlbpg8spfxsgbctpttbxxxsc +mjfsxjtthljlzzjlxspdsgsstltmlxf6 +48zvpktkpk3 +7khsdbtp43rgggnxf +2ninedkttzmpqddsix +xjcqvkcnbpbqsmclfnsdbnnine3eightfive +7eight6 +eight8zqcdbzqfour3 +one8eight27 +ninemmheight3jdkktmthree +oneeight3lbsrnqrn +8ninefive71 +hd58sixtmdj +fivesevenfourtwo4 +fivecdsvgkfgbntwo42 +593jxn +sevenfxkvdxfjgskjhhphnjrgfhs8sixcnine2 +fourtwo2sixthreefive7rq4 +threesixdhlkvz3fvdslkbs3 +nine3fkrzbjbmjbsr +nine7seven36 +sevenbnncfhrnzq52eight6lvfdmqhxkdqjl6 +zshsmpsmbzpnfthree1five72fivetwo +threenine59seventkthreeflgkvtp +nine9nine6 +8five4foursix4 +jnz1m3fmzzgt9kbtpr +81btdvrcspvfour +three1smvpjdnhveight1sevenfour5rqkqvq +49fiveeightonefive +2xmdtnineczgbqmhfivef1six +638nine +eightsix6twooneseven +jgtwone6gzchdrkts +93tsrvf48 +1qkrdfhpseightninelddrnffp2gc +nqvkkprztqsqfk74threeseven5six +14two +dmhnlgxqpjxxvpshqt2sevenplzbgvsz6 +bffour72 +zgkgvone8bxsnnlninegmjtnsqtdp +19oneninezm88blmdhbcrns +2fivessqk1fonevghgnz +ddszqsldhxpsbprdbqkmhs6ztkbzbkm8cddpqm2 +7eight5xhdtpfive6mbf +qxcnnmdt5vctqqhmvrmqblsixfour72 +6onetworpstxdq3tvrcmssmkfhbr +7twoeight1 +64two3sixsixckbkshnkjmtwo +7csixonegdbrvreight +bfdptjcjdq4five7sevenfdhhqhseveneight +8one8dzbninethrmdldmpn +three7xghxhr1threerqfxseven +two9xrhvzkgcck3vfour +5lvtrgmpttk3fourfour +five581cjndb +3clp81dhzcbzxc +threesixsixbtst27 +fivesixnines146 +gppzks5cqggtq +4rgdzsnqlcxone8vninegkgqh5fcbsfl +jfpdpfcccrjpcfive2threeseven +ninefoursix6sixtwooneone7 +twothree3njhxgc5rhntgnckg +3twopvtmvrcrnr238 +k4mgzqbnkrthreeseven9 +bzkoneight2jxllsevennmhxpgbdkfive +886svgcltdl222 +sevenqjgkjdfrrskhklvrg9fourtwofive +cdsfdkdsvtcjhzdpqdgtwo454five +lmksxbv8foureightbxskfblhllsdrxfs4v6 +49sixfour9nine15two +75mtcmthreelvmsksnine9 +foureight849zgl69 +92eight6ninezjfive +8onejsfvnjktqksixlfnxqrjmdvt8vhttwo +48three +onesixcksvcdeight3tr +hvxqb1fourseven4 +four755grdsixthree +seventwokzpljzth6mzkvsdbgldfbdc +ninexjgzkcxl3sevenfive +949klmgj3 +53threethree +lzczjzsftmcmclqqbrgjftfhxz3 +9rpzfnrseven3tsqxxgtrsq +fcndgzmtsj86psclvsdvggbhfhd8five +qxkd2lxzhhcjlxonel48ndktqt4 +2five5twovplrbfxfjzvmdvjs96 +4drtzsix5phvgbqjsknnine9fk +btmdjvnkrqxvjzchkkdpqcnldljs7eight6znfphg +xtrjonefour8threexksbbvkxmkthree +sixhtxkz7pnfzsnpnxnine79 +eight5826 +hrxqbqq5sixkrdjszbblnpdhfour +xlcmcgprrp2 +seven4vfm3 +bztngjjhfivethreenineeight5 +oneonedvgbrpgqrnh77 +jfnphpvcggfour5zoneeighttjxhcqhsml +796fcone4 +7fivetrmdsb +2fiveseven +fmtdrcczngfivefour6fiveqbkn +eight25lxjdzkrrqj +fiveninefour373 +fournr2kzbls1tghseven +3nlmhvbninenine1fourpppthree1 +j4fourtwo8 +one2f1oneightc +8g2six8 +nineqzlsxdktwokdhsevenpkqqhjb4jz +cqsnztq6hjvkcnpxhmplfxfv +6svktmthzeight1nfxldggeightqfmhhzzsdthreesix +five7six9 +thlhmgvvrmqv9 +fourpvksthrjlxxdddseighteight55 +qsccghmztwosevengcrfqnzzmrhbgrxlrsxqxtmthbv7three1 +onetwoj19eight1 +8xgtltlrbnscvtone5nine4 +ftx5 +knsvnknplxrgtnrlqcl5 +nflmxkm2dznjhp7three8 +five2tttpdfnmdx3fdrtmxzqx38three +two3onegkj +47fivekd +six9one5nine +l3onegpj8threekkgdkfzscrrx +four4ninekfndgvhrrbfzpzrnvpzlxss2l +ltgsxcrgzqrfpkkb3oneeightfive91knzsppbbx +sevenvplfzkncmzninenine1 +sixhjjsxgrkgstwoeight1knhgsmscrnpcsone4 +1jbm89two63two +onedmpxhvvcjssixeightkpvdmzjltwo3eight +fivevjjtfeight6nine6 +thffrjkhsixsix1one7one +dbpvngh3eighteight86foursix +pppcpjmbmhsvhjmkfour2onedlnrg +2onev8 +55gpvxsvsnpfrpmn +lfsmfbone58 +tv48threetf3 +8threeonefour71 +ghfslsb73dtlgjnj +565twofive7 +sixljhfccjg5eighthpskg +5four2four988rd +xtgtb99 +kkzfxjszrfjvqllzlhzsninehzbfbvnhtzjf2 +165 +3jtklkpsfxpxlrgltwojxcpqjdsfbs +three7vknxbtthree +7fourfourfive +sevengseven71nklkzdeightsevenfive +eight37one +onenine2 +8nine9vkxxhnm6threethree +7one96fivesix +58bjnfhjxsm146six2mzv +99jdqbtb5seven +8mqztm7bdjh4 +6ninevninenvxflxvgg +k2twonek +gzmtwokrk9ptrsixfjbktjc9 +8fivesix +onesqqkvdtrs5vrsbgnvkjseven +bnbxpqhqxthree79 +nine5l96ninesixqhtxpkzb6 +sevenfive8tklnkqtwo6three +qb2onenldzvsixdjmjzdfourqgjsssr +thqmrjnjg3dbnksktvk +318 +three71blglscfrzql3six +9nine6nine4 +sfive1seven1m +five3dj16 +5ninetwotwo8srrvkx3 +spcsttljpl7 +6rslsdkfs4834 +dshfour8knjplkghpfpzcszqsix1 +ninephtlxnnl8hzn +bmr5 +tm4czfdfbhps +sevenseven4three9sixtsmg +sevenprdqm1six47cnbskdfivethree +7one6gzfdvfvfourtwoninelbndhdkqeight +jzxczvgjgxdfrzn2nineseven +zpcspqvhbfxlcgt1onesevenqktvgjhm +bmzdhnljms4nkjzhkrtfzngbn +nine6mjfbftpcfh4five9eight +qrvsldss4nine4 +lffkvnhbpbtnxzncjs4 +76ckghqnbsnlnjftwo72 +7jrqrkdksixsixtwonett +3xc +mzveightwofive2onesix7five2 +74five6mrqx464 +qtwoqlrkvlmpqfjvm8onetwo +41bchstnlzkntwonineseven1pskh +twoonejtjph15three +fzmkkgdq6 +21one +eight59fivenine +jbfmfbseightmzlknl84 +four4rlzplmmmcplfour4mllmtxx1 +q349j +6dbpqgttninepx623bpbhsnxcmg +52hvsvpk +8fivesevengzz +3fourfnfldsxngrknxnvts +18s +three2561b1onethree +zlppzxzzsixtwo4hksclkzhtkdsldfgjhtfhxcdsmdbr +26eight65five9threeeight +seven178 +fvljxzhdln11eight +49four6fourqmspqkbphjzvgzgbvrbmjfsm +onelnmplhjtjtfivesqzn7qmcpchjtxfcc +hd8 +9pnneight +five1qgdzkj9eight +rfhbnhbkzteightfivesixtwo3 +bczljcceight2 +145sevenhmfive +8lbgkvdxlccgzzvvttcfgmthreehhmqfivexcdhdd +6bqxzzzgpdk48 +twobcxchbfour5m2two1seven +twotwotwo6513fg +48one6tmjxclchtnpltmjkpmmm +vhkcklgdhk9xmvtbktdvjmhjtwoned +eightfourfour9one7 +fourqhgjdpr4p3sevennine +vlctnqfour4724 +9spbtvbsh7scvvx7hvbxlh +eightone1ccdhppbsninejfktrxst +448fourhjk3r3mhstwones +hbgfourtkvg87sixlcvtjz +fivesphnkzrn5threeninefive27five +92two95seven5 +twosix84zjqtp +9bxppvsjgdmbqvkstrqdsixtwofourfour +fourfive3sixnine9gmrdhfhkjtrnbl8 +gxcdvsjxgll46mrrdfpdkdl +4foursevenzklvhrdvpj +seven1rz24rfmnjxjkthreenfvjdsjtgqkd +2xbfivelpfhvhsttgjqfsqkffctppeight +6vxfjbssixfkjqsdh83xgzdmtntgm +5four98two +xdk6 +ptxtvnlpxbpkxptbhxheightfour7 +6four5sqgfour +eight8rbngtqpvninelzhffxpmtwoonefourfour +three1eight2 +1two8nine +9eight82 +5fourshdfivefpfd3 +two667dsmv3lvhszg4 +kcxpmrv99threeone +seven7five3ninerhjbmtfbzsevenfive +4four1threegvxkdsfour +qdqrgf6fourfour46 +7nlztdphcjdnqm4zddjhfreight +sixthree62 +vs86four +sssbdgzsjnlftms8 +3ninethree45twofsfsvtnl3three +four7zcfjtngsninethreeninethree +gcjxkcnsevenfivefourhrxzvxftnine4sixzm +thsdcone23bvrfour71five +fiveeight5fourrlhjtmrtwo36 +61lxhrpfvbqkd +55three5seven1 +sixsix9 +gklpxzmcmnnbhsgeight63 +fourninelxm5cpkqvbpbsvjndn4 +hcjghqfssevenxzdljnvqsix1sjvrhxxhxthreesix +rtfttcqmxszrsixtwo37scglpjfjt5 +eighthvbsldnhfzxr7eightsrmqhsgonebx +zcvqxjn1vdddlsevenninefourninethree +qr7three3two4tdrqd +qbjttlfsrrrhrmkhpvgc7zkone +6fiveseven7ndfhzxzrrf +fkxhpzb568eightspdxfngrp82 +seven4sixtwo +nineddhgjn4 +37chjlxcbbjrjghzjdsix4threeone +jhngdhntvfmcbjjvlgx979 +9thpnx12835one +onesixfzjgpfourseven1nine2jrxjp +5rzvhjqnlvnt1lone +9dmftktf9 +eight5eight +grkfgrhnkjm9 +23ksknkqrdthreecvg2rbxkkhlqttfivefive +3foureightshnff5six72 +19ninethreebcgxkmjqhgpmfx3 +28rdsm5fiveeightthree +dmgpjdzfl1two819 +pbrvnfpftb3vptbqncmqszbbctnj363 +fzdc29331 +bnkjk9m289rxgqn +fivenine4seven6plsczmxr4 +fourmxrltjgdleight1three +nvjxvpgtplgszgbeightcccxxjhbsfqdrj7 +5stjbvxglkdrbp6kllbbnptdfzl +dmtpxndvvrbksfournine5one6 +vnlhxcssevenjlfgfournine69hmnddrthree +blchmddjmktwo4fxsqlpfn69xhbpblrlmone +17qdxzqlpllfourszcpxmtcxhrqzqqhm45 +fchdhsjzt6two9 +srs3vcq7three +twotwofour4seven +three4six8lsdg1 +1fdvdhxrxmmvzonehmkzspfdlrdvlnfzfive9 +7threeone +96ninegjcxpstqhxbdzfsrczm2 +xthree19 +bgptbh73sixfour +eight82 +sevenb3sixthree9zjflmmdjfour +kcninefour2ninetzqgrztwojq +eightfourhfqttttxteight5 +zghnvzdpfivevvgfjzfzvcbvccmtwo5tkzj7 +33qxzctgqsvxnine9 +6onejdndbcjsseven +294xqcrnine3844 +two6ssqvnvm889 +rzfbhbr15jpnfqmzthreepnine41 +eightjlltprrrtv63twoptg4 +threetwolzdbgcpkm3seven1five +mcbjrtbtbp7twoseven7vdttjvmxbxkfmgmvhrs +three5hfivesevenqrc6sbst +eightdvvtsvmfqeightfz5six +kklpnghzsfv88two86eightplfgjz +bcgntz6gqxbxxtnnonegqlz4fivexmjxqf +mvbgjpsmhntf7mmshslgvv17thlknqfivel +fourmjflcbtwo7fivetdntjstntv8 +89fctlsxz8eight +1twosix57sevenfive +3ninefivencdgmlqxlnine96 +twofoursevensixeightpmpfpfljqtnm9six +5hqnxvlmnh1bxxhnpkjhgzxlhgffv +nine9fourtwo8tzseven +grcfkddgseven55g +seven8nineeight4one7lnntwonebc +one1ktgggr +76eighttwoqzfnllqnkq +cgjkzlksl1823749 +9twonvhlhrlxnine7eight +qtzmndkrqqcpmjcxz98kklrtjgbbnzglstnnlnqksrgkzz +cqxknrmb5cfhfgpk +9lhrnlqrnninethree +ftlpbv55nine +2nine5tfqhqtwo +mqcfgssixtwofour6cvncgmxnlq +946eight84kvflb +h1nineglvgmh9txxg8 +lxqqqdfive5mcgrjkxmlzdqbkldjqkhlxnbg +jjkvdzzkpxqp1three59dqthvgkfmfjvlvnrtlzlmqvcspjfc +sixfoursix87oneoneseven +1ptrtgd6 +5threeeightqqjrmchfoureight +one42mdmfkrzln5ck8qxbfqf +seven819ninejzrddsevensix +vfpeight4pngqpbvsbz +threesixseven1 +7twoonetwo9eight88slpctv +fqfsixtwofpm14seven +6xcdvsftlsrsrgseven5seven +mhmgzdgrc6lnnzv6pnr4stxnmrreightblzp +9glsqqcrttdgsdqkfour +82two +ftqzqnlddctlxmb3rdlg +sevencxbpxvznqmjqgglfccqkvjqmjbpthreenineeightnhszbvnff7 +twosixplgdjplfthree9kvhvnzzqzk +1pfvkfblrmz +2n +threeeighteighttwo7qmlnjx +6sevendhc6 +nineklzvllx3fivesix +2nrrx5fourfcljkdhpk +eightone9eight +gqhsmccbpjc46twooneighttbv +sixtwo2bxpdqfour5fivexkjxzb8 +six4nineggtqsxjd16mhgpjflprmsix +tndgkrpmfour1foursevensflkzt +bpxtdkrcr5nsevendltgfgkzxdtbxsghkkninesixone +one22threefivetwo +lzq7fzbqsd49 +cgthgcsix1 +389seven +cmgctmtwo8eight +2qvrbrnvp559 +eightjpkjnpgplseven7oneightdv +cdzoneightsevensixeightmfjsevenk2eightfour +2sgtftmrrlfhgqxdmhtfqncslmnlvdhnjpdtpg45 +fiveone1 +ps2threeeight9hvmjrc3 +pdsr2xphzmmztnqxpzq +nineeight7ninevhlksv +jjbsm55fscpfpklq1sixseven +fivefive1nkpzcxrxbfour +fivesixdkxvbtzvtlsevensix3fivekh +twovrzxlmnxnhonedpdmvn9 +hmqccxh6 +five6nine8vcbzzqrvn29 +5nfmfthree4nthreenine5four +kpsbqshc21dzrpktfseven +cdfsszrtpnsfhgsix9bzqjdltbtzjsz +twofive4eighttxjxoneeightninet +six4tppbxfiveblktrzgdvks1 +eightzmvmdbbfnft2 +7npgl9vvtdl2 +3twoone +seventhree6skl +onepdfjql18nine631 +jpjtvxck3sncsvnsix112 +njrkcgznhvfour1 +gfmtkdr2pvvlnh9one2qgvmxfm +4jfxzmcdonep +one9threenine +544 +one5sevenzhmljdbfb8pncqtdkch +nine72eightxvjtrbzpzvcqvlone +sixfive8hpnvvjzld4 +24f8 +6bqtwothreectlcqkkzfiveppvbgbvspncldjhb +ljmrlhxvsone1qdsfhqqqlljd6seven2one +mfksxgxhrqxbtg73r1eight +ztwogdpcgllnpp516ztdkj +two8fivefourbs5jlzfnleightwoqvk +seven5qnrvpqtrvlt4 +ninedbnd8mrchlnineqhhqjnznts +onethreezmhshprm2jb98three +3sixfivesix +two6dfgpzqrhzp8z368 +twoonesixfscgflrlkmbtmv5893 +fiveninegkfbgczqjhnine7g +rbvknineflmkl4btbqbkpsd1eight4 +39324 +sjrgxtxppvxsseveneight4fourkdcdsmfhnnqjpbtxg +6threevcgjmclnhcfxvvbncnhjkmmsqqhqffivetwo4 +foursix1four +zbztwoxptgdffourgzgzzhhmhg78ljlchqh +dcpbt25vcdf3three611 +v58dtgrpl +rntgtrrc67mdlfxzgkvjjpqtfournineninefour +lpcts8vjznknlj +bpmv3 +5z +zmsevenbnckdjhpbsvglrfsskcsevenfour2nine +6threesevenprcjlk5644 +nineczcd6922 +2vksfctzbjz +kz93 +twopfhlqplngsj6z13four +8nm3sevenxqzj +cjgoneightthree5kmpndvrmkljeight6sflmeight +three3b3seven55xgrrkssnzsghd +5lvxlnpc24fbrbtg5 +7qgmhfnine +sixpbvfjzkdsqdpsthreekj91nine +sbmxhcxonefggt4f95oneseven +onemgkvjpgfdjmhcsxsmlfjgzqqrftgxgx2jdmbvbfdf4 +bvzcskfrlg8jseight +hzltjqmxjt98eightfseven +2seven7vbfm44four +3bvfnine +4mqprdhhrdqz +twothree2 +seven3threeeightsllttbrdcthree +gmpxgkvv4four +vntmvnd4two +fqhvkqrxdtwo1threeqrmg5 +5f +fivenscdbpvlz1 +vzdcg921fivelplfsbdccrsdsq +sixnine2rnrdqkfpmdfives2 +5seveneight4sr9gffive +hknjrm5eight34nine +7965 +2t34two73xlfzpd +626 +1kdfnbjgtshsonenine1eight1kzp +two8mxrlgchctdtflkknonezstpfgxsdx28 +sixfdjgvfm1sevengg656vqcql +threesevenbjcfxlbml8lhxjmzgspfour +4phlqzbhvk5four +1lkccpmxmlxlqrxzz8lkmbpmdncgpzsxgqdcb +klqcnhjvone75 +5two7 +2ninecgrltzpgzpfourfour47seven +threeoneeight758threegtwo +54j +seven9lqbfgrsthreefivefour +six7kjm2fzcrdeightfour84 +four198766 +six3mfgmcrmlnine6lhddlhgl9 +rkpksqvfiverxvbseven7 +734six +five5one9qd4bkgfdjgtxzlxfjr +17eightsmjzbgdbd2nine +eightqnthjhlnfive7nddfjcxq +fourxkn6two6three5 +twoseven2 +eightrbhdkpxpbsvmfivethreetwox4f +4bpgpdngvnineh +lvpxjhgkz77pthnktwomvonekjvkkbr +gqpcqlzfive2threejfknlchf +zgjslb74two +sixhxmt4 +4bcqxrcf +onesix59jktnrtlone9one +9seven1msixkhxbkgbnqkpfjrr +four1lhslrtdrnxxsmptbjjgj5 +eightcvbzqczt9ninegxlpsevenfour +threenine2foursixtwo2bldhzmsdvj +two8dmzmbnkjqfdqtmzxndrsnkrvdnl +9lqtcrvkvhdkmbfivenine6tkqh +foureightjdpqhldvzeight17vbkmjvfs +vkzvsphbltfxjfxxsl9 +shdgdlft27 +87twopsix7eightwoj +57threeone +pshspdc9fourone5eight79sxrjkcmcb +sevenhmzvvbpdktxxjrlvntx1 +ninethreendlnnine9 +nine2tkmkrpccone +7sixsixvdv +vpktkldsjcpsxjztmthree3onefdbcxkrvhcm +9lqmbltfoursnsbrqn22sdnrpxfsjfour +five8mgctnvstcone24fcfbcqtknjmddknkzeightwod +8xfbqxtwonmjthm24twofivelckrr +xhnldpddxcjnm5twoddtqkqd +sevensixdrcvgfxqpmvrtmgqdjqvclgnqjsfhnbbs3jvxnmjqcbtshp +mfour1zcpnpfcdeight +6twofour +r1seven7tdjgxshntl +eight5sixh +xntwonetwofqpxsgshnbhjcsrld75fourfjbllqscg +three3vbvqklcp7pfkngtnineslmrlq +7six3onenmttntsfq3 +fivefive1seveneight +p2rpjkcpcsix75fivednd +ninekkzpsone167hnqlhvmtbffive +2qmtbkslqgjkrqhnine3eightonefour +2nlfivefive6 +xjvbkbtdqhgvsseven719fiveseven +prbtnineqdvknxkblzgj7 +lkgvhtfreightninegtfrmqhd4njvsgdrhdqfxrjrcvvcz4zs +25four24dhqqkpbprx +29two +7xsbfsfivexrrxhthree +fivesrnvbdtnqnfourninelctfnxkbtv6eight +9kkpzgthree1stb +sevenhzxdbbb81one +2jszvqhv +zkvq25sj2 +hxxfg4kqjbjpjczzddrx9spkgdcvcsvmblvfxxcn +486l2clmtcgfive47 +dfhkfnfour76 +52hnpcc +kmktwonejdpgch9tthree +x6bkqrlhhcm96 +tf7kndclhgjsoneoneightxcx +mdzmsfkl5pnine8 +ghzv2three +vctrqxfsxhtblghfchthzhninefk3eightqjjjjg +three2jmvkmfour +rlkbtjpnlctsxpfp521rxbjdfsixhvp1 +7vxlkff32mdfsqrmbnmtwotwo2nine +gl6seven35two1 +two2rjtvndrzvthreethree +tjpxszlthree54hsftvc +jsthree48 +seven6fourtwotwo +threetpnh5ninernztgb +18pvqllhjf5eight9vldjjqcjfmlhnddone +two9nine6hgbprcpxvmntdjkfivetwonept +7four8eightktlhdpmptone +rrzbgtfrrqkspsix3rkpzddzrbcrzvxzstjbqhmqq +84qxbnxdpqppjfiveeightfive +n6two1brpjhf +plmkvpjbqr1 +sixsixqbksfrndvg42hclgpgfggpxmts9 +1htlmmvbnsix +dleightwolvbvmsggs9njseven5fivethreenine +eight6kxqqdnqp +5eightgdvgthfiveshthreesixfive +6seventntzffjkkvvhtgtwoonethreefivekzvptvxfjg +three6blrfsgdqsxgkbqj3 +eight1eighteight8 +8four419eighteight1bpv diff --git a/one/output b/one/output new file mode 100644 index 0000000..4933c15 --- /dev/null +++ b/one/output @@ -0,0 +1 @@ +54304 \ No newline at end of file diff --git a/one/src/main.rs b/one/src/main.rs new file mode 100644 index 0000000..d292dec --- /dev/null +++ b/one/src/main.rs @@ -0,0 +1,20 @@ +use std::io::{self, Read}; + +fn main() { + let mut buf = String::new(); + io::stdin().read_to_string(&mut buf).unwrap(); + + let lines: Vec = buf.lines().map(ToOwned::to_owned).collect(); + + let answer: Result = lines + .into_iter() + .map(|l| l.chars().filter(char::is_ascii_digit).collect()) + .map(|s: String| [s.chars().next().unwrap(), s.chars().last().unwrap()].to_owned()) + .map(String::from_iter) + .map(|s| s.parse::()) + .sum(); + + let answer = answer.unwrap(); + + print!("{answer}"); +}