From f8d4de16f63cdd1007222f95ea82bf0829346cda Mon Sep 17 00:00:00 2001 From: Quantum Date: Fri, 2 Dec 2022 20:13:46 -0500 Subject: [PATCH] Uncheated --- day_1/main.py | 15 +++++++++++++++ day_1/main2 | Bin 0 -> 43088 bytes day_1/main2.py | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 day_1/main.py create mode 100755 day_1/main2 create mode 100644 day_1/main2.py diff --git a/day_1/main.py b/day_1/main.py new file mode 100644 index 0000000..8176639 --- /dev/null +++ b/day_1/main.py @@ -0,0 +1,15 @@ + +with open('input') as f: + groups = [] + sum_ = 0 + for line in f: + line = line.strip() + if line == '': + if sum_ > 0: + groups.append(sum_) + sum_ = 0 + else: + sum_ += int(line) + + print(max(groups)) + diff --git a/day_1/main2 b/day_1/main2 new file mode 100755 index 0000000000000000000000000000000000000000..13437343f4075d57c46316f7c8ee8d82ed30ee28 GIT binary patch literal 43088 zcmeHw3w&Hvo&TN5vrQkNZwlCHDW#<(%_M1>Pzvc|%7iv;Y*Im%dNY|!l96O4%uLdh zmz7c^#_XrCsHm(~1-BpyE{K)a2IvylW!bv8T9Jk5Do(bQjVo%@F8P1I=W*xG^iHX` z|HtS5$!#;gbAGS$JHPWgk9+3MJsn$Us*UOR zTxMKgheAaIr`;HFXc{Shbk}A|5jd=w^u>N39nV1;g+h(Rh_LRo#9ANUrAqeRY_H4X*^n5 zF6gwY41a9CE4J-4+5FDxfIsp`{}daGAw}FW{LQ^*+QtjIrfo#h@p=WyRF_Gk zKLEu}_@_{i6aJH^h!cJQTAlE>XVHIQ7CnClJC~$cs4`jfyppBdwOROQX7R)3EPB3? zg}*I}{Rgw~Z_eV+?`F~St1S2jv*_u`Qs2E6W+>}Ks+2Y z!)@_IEEMRf3j*g2b_8N(A{GcI;&nlvuQJ*liuf9~kXB*VMdRjnAiAQhP=C#~Escpa zrWx$(^LoAIQX6!IBkfMQ8Us|gCK&DN4#Yy#2^Ecr@-ov*bi|^&&CXDyJ<(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>y=N*ihm}B_;UvhUCHxM+qN5FC}{i zp2;^#TlYjzgoKHhr1WBw1>fYQWlYe}RRa`IDLn3Pl!{w~Qry`hEw(C3V^Q(#Lusf( zeXGc4+pQdw27{*jjR1D-v8dvXtMT6zca`SWqdZJY_QFzYHAxs`VQl zWO#YRr}g}|%*nEJn($uy+2uVRVj=Dkz!)OYcHyx%acTHB$l2xf^MV?F0?(J&FD<8W z-$24Hub&UqaJptxFf)E1Rr1>ZMy+C0@EVoXAXENH5LmvJ*U$HBc%LRH1)1_MWyl*F z6{CVjr>eXHy8SfvRV3`?AFY=Z4a+p6g5GJh^M>H%}{$u~=rRB6;^7kJp`9tc#dkt%aRO&;^Yghz_ z&?mZl{r(sY$5NsqrR6l_?_uro$C{;phPt0>HCj&R7ebggUA_^Jl(A+Bt25%KR-&!X zMXLPFcGmKl&nnSYUK%b}@)Dc+EDp$YX8pC_HK+Wgtj^hBi%jz@6#J#i)wqpW%D=l^ za`2TG_A4W6@KqL>IP%wUV!-uU1~DUR>{9ZX{+oTBl)oXP!)kdAIX*L;DL)vM@;pM& ze(9`+{6)V`+xh;nTjn;{kw|CqGM^D5LZX-x8?HjtU`vt4BXd^&(Q!EiI4ky$*4KiM c%hbw@1x#l7XMxR0e&b(D`8zTMGP1`10`Zd>6aWAK literal 0 HcmV?d00001 diff --git a/day_1/main2.py b/day_1/main2.py new file mode 100644 index 0000000..19ba106 --- /dev/null +++ b/day_1/main2.py @@ -0,0 +1,22 @@ + +with open('input') as f: + groups = [] + sum_ = 0 + for line in f: + line = line.strip() + if line == '': + if sum_ > 0: + groups.append(sum_) + sum_ = 0 + else: + sum_ += int(line) + + a = max(groups) + groups.remove(max(groups)) + b = max(groups) + groups.remove(max(groups)) + c = max(groups) + groups.remove(max(groups)) + + print(a + b + c) +