From 8fc07c37f15f5535bfa36af4c3ec82851e8b6385 Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Fri, 1 Jul 2022 15:56:12 +0200 Subject: [PATCH] Oops. Forgot about these --- Day 10/input | 94 +++ Day 10/one.py | 21 + Day 10/two.py | 46 + Day 6/input | 2226 +++++++++++++++++++++++++++++++++++++++++++++++++ Day 6/one.py | 17 + Day 6/two.py | 20 + Day 7/input | 594 +++++++++++++ Day 7/one.py | 42 + Day 7/two.py | 45 + Day 8/input | 654 +++++++++++++++ Day 8/one.py | 22 + Day 8/two.py | 73 ++ Day 9/input | 1000 ++++++++++++++++++++++ Day 9/one.py | 32 + Day 9/two.py | 59 ++ 15 files changed, 4945 insertions(+) create mode 100644 Day 10/input create mode 100755 Day 10/one.py create mode 100755 Day 10/two.py create mode 100644 Day 6/input create mode 100755 Day 6/one.py create mode 100755 Day 6/two.py create mode 100644 Day 7/input create mode 100755 Day 7/one.py create mode 100755 Day 7/two.py create mode 100644 Day 8/input create mode 100755 Day 8/one.py create mode 100755 Day 8/two.py create mode 100644 Day 9/input create mode 100755 Day 9/one.py create mode 100755 Day 9/two.py diff --git a/Day 10/input b/Day 10/input new file mode 100644 index 0000000..f8eeb97 --- /dev/null +++ b/Day 10/input @@ -0,0 +1,94 @@ +38 +23 +31 +16 +141 +2 +124 +25 +37 +147 +86 +150 +99 +75 +81 +121 +93 +120 +96 +55 +48 +58 +108 +22 +132 +62 +107 +54 +69 +51 +7 +134 +143 +122 +28 +60 +123 +82 +95 +14 +6 +106 +41 +131 +109 +90 +112 +1 +103 +44 +127 +9 +83 +59 +117 +8 +140 +151 +89 +35 +148 +76 +100 +114 +130 +19 +72 +36 +133 +12 +34 +46 +15 +45 +87 +144 +80 +13 +142 +149 +88 +94 +61 +154 +24 +66 +113 +5 +73 +79 +74 +65 +137 +47 diff --git a/Day 10/one.py b/Day 10/one.py new file mode 100755 index 0000000..f96436a --- /dev/null +++ b/Day 10/one.py @@ -0,0 +1,21 @@ +#!/bin/python + +with open("input", 'r') as input: + adapters = [int(i.strip()) for i in input] + adapters.sort() + adapters.insert(0, 0) + adapters.append(adapters[-1]+3) + print(adapters) + i = 0 + ones = 0 + threes = 0 + while i < len(adapters)-1: + if adapters[i+1] - adapters[i] == 1: + ones += 1 + elif adapters[i+1] - adapters[i] == 3: + threes += 1 + + i += 1 + + + print(ones * threes) diff --git a/Day 10/two.py b/Day 10/two.py new file mode 100755 index 0000000..3710bd6 --- /dev/null +++ b/Day 10/two.py @@ -0,0 +1,46 @@ +#!/bin/python + +import time + +# Source node: [Destination nodes] +edges = {} + +# Returns amount of paths +def find_all_paths(start, target): + #print(f"Checking from {start} to {target}") + if start == target: + return 1 + + total = 0 + for node in edges[start]: + if node > target: + continue + + total += find_all_paths(node, target) + + return total + +with open("input", 'r') as input: + adapters = [int(i.strip()) for i in input] + + adapters.sort() + adapters.insert(0, 0) + adapters.append(adapters[-1]+3) + i = 0 + while i < len(adapters)-1: + source = adapters[i] + edges[source] = [] + j = i+1 + while j < len(adapters)-1 and adapters[j]-source <= 3: + edges[source].append(adapters[j]) + j += 1 + i += 1 + + + print(edges) + + start_time = time.time() + + print(find_all_paths(adapters[0], adapters[-1])) + + print(f"Calculation time: {time.time() - start_time}") diff --git a/Day 6/input b/Day 6/input new file mode 100644 index 0000000..71ad899 --- /dev/null +++ b/Day 6/input @@ -0,0 +1,2226 @@ +edmzkxfoprcnhijtyvl +adxntojykfcvzermplh + +jbhpksufcaty +hevsuaibjkt +jbusytghak + +ixpckvbrylgtdm +hpyojlsgibtvc + +sga +sag +gsra +awzgs +sga + +jnwcqfisokbgmt +jmtcubwnsk +bmwkctjsrn + +ekxwotiyfhagdlmqn +hpvedxwscgqjlkrf + +drtguxboe +uxotwejgibfdrn +rkgxbtaeoupd +kohedbgzurtx + +di +whdg +d +d + +pukeyxjrvmowta +ejyxrwopkhtu +upojtrxyekw +cjxubkyetrowp +tgxwyorqnejiufzkp + +nqbraty +ybrqna +qyanbr +ayrqbn +aynqbr + +ezljbkmhionfqv +hxvtnjqr + +fuwsngzivcjrk +kprjnfucziv + +wonvukgls +wkoslgvun +kusvtolgnw + +tieldgxmys +dilexmyrvsqj +dlxyiems +sylxeimd + +gfapnyrzlwhscjmixb +yramfspwnicghblxzj +rnwmehkbjzpalgyfiscq +jfyclgmabhrizvwpsn +gzsahifrytmjlnwpcb + +wfyrobghlqcjn +yzwhfjlocgqmbn +yqgojhlnwczfmb +whlozqfcmnjgby + +envihwzxs +ivsw +iwsv + +gjocrpmlhnkbxevdsztq +rvoecmjbgndlswphzktqx + +ph +hp +hp + +vmzyftwk +vtkfemzwy +tymfwkzv +ktfvwzmy +kwzvytmf + +yntcgdfblkz +dykfcmnltbz +tmzdnylbfhck + +jyuwnazhbtrdvlfcoxmi +mlxowqarbhnitjfvcduy +hvbjknialucoptxysmfgdwr +fihbrodmtjcxvnwalyu + +xdicwhvujszagmey +czjrmdyauevw +muweycajzpvd +vayjcwedumz +uwyvcedazmj + +zqniybfcr +rizunqtpcyf +cqyizrnf +firzchmlnqy + +ckezaduhtxoilyn +kliuytzonedax +ulkxznteiydao +uanxdpetzlyiwok + +opgmiufxdkw +onfuxdwmgki +fiwxmokdug +pfdiumwyxgok +fodxuywmigck + +fg +zgfb +ufg + +z +ze +az + +scwqjukmhplzxafiyvdtr +mpwyerhvqzbfcdikxualst +gkzrwpcfnqvxtiyuodlsam + +enzt +yzprno +mcanslzq +zonr + +xlsqjnuobfymtd +obtueyxdjkciafqnlmz + +fcowy +ycfow + +timwqdnebkcsajpolr +hycqdueti +ctgyvidequf +xiuecdtq +viqetcdz + +atlqfdinogrbm +drgqxloektiambu + +jd +jd +dj + +cknxalfwburopditehsyz +wtigkfzlchsrnybuoxaepd +vaponqfukzcsiybrljwedth + +rxhuz +drzhkxumtginj +rcaxzohevyu +pszhreux +ruxhzpy + +ceanhqvbtkgiplr +mlpithvrkcaqng + +lageimuyjxntbwphfs +gpnihamyelxbwsu +yxmiswngulepabh +wxsbnhpylmgaieu +ayximuwebhpnlgs + +begmvrkqptz +hwsfjlxdciyaun + +prmkvejosyubtnz +rkeoynmjavzspubt +huomzbtnwyrepsjdvk +ebskrvtzjmyuopn + +ugmwobeiyqtckszvpaxn +sivuazqotwxykcpmbgnhe +ugovsircnmqztplwayxbke +sxibehutwazpgqynkmvco + +gmfipesaykorxbwjl +ojlfpxwgrnikmeyhqsba + +c +c +c +m + +dapbveo +armnqopxhvie +aptebovd +vpoeza +aotwfepsv + +i +ic +i + +pftbquhlydrs +postnjxlihagdzbywce + +xcivfymjdrzhesqb +fzrcmjhbsviqyxe +vimlnscfwxbyrhjqupeo + +f +f +f + +usnh +rmupglay +uqv +uqw + +ldb +ld + +sbrqvouly +sroylqf +qsryitoe + +wntmgqjauybzoldvfck +gldqtkbaeznufwymcj +lrchunbjgdykzawtqfm +mcabflwtyqujngkdz + +rofcihkmqbwgtexjavnz +qfagcjxkhmiotbvwnrez +ntkqjiyzvboafewhxrcmg + +bv +tv + +wtvepsd +dyzhir +jbqclkxnmguaof + +gzbtsreonmhxlkijpqu +kxhmltszqpnorujbige + +hpeakzrxymigovt +vrtxgmkoyapz +pgzrmvyoakxt + +lbygrmxoivfucw +rcjivowfgblmxs +rxoiamvclujbgwsf +xvrfpibeclnmwot +lofcxrivmwb + +jhxbfydcqw +msoagpirvktelz + +wczxsbnqe +zirqonwpbxe +nqwxsezb + +ydwo +ydp +yd +axdsvhjmfy +dy + +rxtujw +doahz +rtsym + +pbic +bc +bc +bc + +jxsbfr +bcsrfjx +srixvdnbwzj +rxmakbsj +sxjmrabf + +wruifa +rfa +arf +asfr +fra + +gyi +giya +ygain +kigy + +tqoxh +lhetqrm +yxvtkqfdh + +ytkqvup +mkpuqv + +jreztqmwvgisnh +byrhwtzedsq + +qjo +ojq + +xbhzsotugeijrk +gkziyorjuxbepds + +kusymzbclghf +quchlgfkzmyb +jurvyclihkm + +whvkxzmrl +krszxwvmhl +zrmhlvwskx +mkxrwylovhz + +sakfigdb +afskgb +kfagbs + +vnyo +uxwoyn +sbpzn +imgtna + +dqjtmskpzify +ktjmeorfaipd +pmatejdofki +fjlpmidkrt + +hauldscwin +tdarhinu +nhdfuavir + +hinbmavoc +virmshcazb +havkrcomib +viabhmqc + +tawexm +xmatew + +opg +gpo +gpo +opg +pog + +vkbznjquy +qznuvkyb +kvuqznaby +qkvuyzbn +nqzyvkbu + +ocansuzdmvwei +hasyfpwqj + +vmj +sknpejom +vjchumg + +mhws +hmsw +shwm + +tcpbdzvarixyj +dxupoyqfwnkvesbh + +dm +fomdg +dm + +yz +zj +jz +vlztahq +fizg + +itvnmlxphycf +fzmcpvxhnityl +clpfnhixvtym + +remig +egu +stzcnbye +oie +lepag + +tzsnfhweuqvoybjim +vxzmptudbrowfyneghcq +ywmlhaotnzfukvbqe +qltpcbwvmeuazrfonyh + +hcytfwgve +dycvepxlhzfngws +vwtcgyfhme +wfgeyvhc +cyghwfev + +lzhbuc +qeczhl +kpfzvhjyscxlita +lzdqmgchn + +qyzgcum +alwesq +bqy + +guxcprsfqezajltmwd +rqltsuzcgamxjfwepd +jfmuzeswdqxalgrptc +jtelwdfcrpagxsumzq +iaqjxeyclgprwmzfsduth + +zcghqfuprlavsjbktxoidmenwy +cxbmwnlogdiqrhujpfsyzketav +cnaugxstkhizjodpwrqlefbvym + +sgvfzhp +fwnghspu +ipsfgah +puhfgns + +prtxkifmoyqwbdsh +iryxfhobqstkdm +fmtkdsyqrioxhb + +irfcynskv +cenorvkisjyf +srfkvynic + +njdshblezrfx +fesodhrxn +nqhiautvrscdwfe +nhdreslxf + +rceub +uabflro +szvxtkyqngd + +ewobrfqcspym +mpqcwfsoyber + +klrxyaf +alrykf +ykaflr +fakyrl + +ezqwmua +wamqeuz +eqmzawu +mqweazu +zqweamu + +jkfqgzhlpwntmduoyscxbea +znflctasoqekmbwhxdujgpy +leqakghpynzjcboudwxfsmit +czuyjtdpfxlhakbeognmwqs +skbqeydcjlfoazmputhnxwg + +haqvxtepiczsgymlkbw +yusgxiaehlbzwmqct +tqnxiylhmzcsgweab +yiatzblcgxhmeswjq + +ogzmupysnrt +lugmkypqizocnvr +syfurgmpnhzow + +pgrb +opycugr +tjrngadp + +swbkulnao +pmkdrbqyzonicuj + +pfzl +flpz +vjzfpbel +sfpzl + +yrboxuhknlwzc +dbiurzxogajcpwyl +xblcywuohrzm +rxfowylzubc +clxqeurwzybok + +earvompiks +zrmsoieapk +gekposamir + +mwvlrtae +mlav +lamiov + +oghqcsvlw +qowhgvcysld +hqewcgvosl +glqhkpcsrvnftwox + +mpajys +mywpjs +jyspmv +lpsymj +sjpmy + +rebc +oxbwcr + +uctgdqwxe +wctpdgjqxeu +qryotwezfmgdixcu +eqxtwdaucg + +motajvxdi +naxtduvoizj +lpoxvgdsfyha +wedvrocakx + +qorxj +ekqzpxj +jqx + +nxl +cnlx + +fo +iot +vuxgo +uo +xio + +gvjefxzi +adsjpbchuyw + +gvbhodi +ogbhivd +hdvugbio +goihdbv +igbvydho + +krdufhbgymvlxiqwepco +ldxuyefjoqzmr + +sy +c +nj +n +j + +qwiyz +qwz +gqkrwfzb +qzawj + +bsax +xwabskm +bxjas + +fqpazsenjukgoyi +ugznyxfqkaopesi +qysokeapnuifzg +epfaqiyugnsozk + +vrxpusdht +phuxsvbn +ahfyvpwislmc +sjqkdpvh + +unkgmj +gokmjns +gkjmen + +skuznvcheflqrpygjm +yjfqghzmdplsnvcuer +utboqrgvlfzjcmxnehy + +i +fi +ib + +p +p +p + +jfwtyhdvugirql +fvhyjwtumrqgidl +fjwayensghtikvqlurcx + +qb +bq +bq +bq +bq + +uyxp +xpyut +xytpu +xsuypc + +g +s +s +lp + +pwugetkcb +kpbwtegnuc +pekwutbcgv +knwgbeputc + +eouscxlnt +epagmtcn + +xlmyghutcbkif +bqgmlkvdhrxc +alonbpzhsjwg + +mkhsnzxbjo +dyvgielqcpfrw + +yftilrxcavjgkue +tkrwlzqnmophbdsj + +itmfbkclyzushnqex +ixbtdfqzlsychuveokm +bfhqejyzclusimapxvkt +lfqschwueztbxkimy +txsmcbqlrgzfiykehu + +yvubdecpxqrhizltskomfj +vrmytoujzcghwlxdbqsefp +oavjfzndulcbsqrhmytpex + +gkrym +yjtpbkhr +ykidmr + +gumiaoex +macfxhie + +qbtgemyrwnalj +raetqlnymbg +ltaomngsbyzerq +retmybagnql + +tvoxad +dxavjo +oadvx +xoadv + +pcbxglukra +klrabgcp +rbzkadlpgc +cgblxpkra +lcbrpagk + +zeaxivumdroypf +uakymxzoirfpde +pexaoiyfcudjzrm + +gjomtlsxyfazdcnrubq +lydrncfamouqxtsb +dqxybsfnglmrctou +dlpoufkbqxnyermcst + +crbwqjdifg +ivrjqz +qoihjr + +jm +mj +mj +mj +jm + +oshtbargiydzq +ospmtardbhqfyiz +ysdhkitabproqz +shjyodqbatmizr + +jxizf +krhizdp +eiaqz + +zfebwrltvjns +xpdfvumj + +sqk +sk +sk +ksf +smk + +mtrqb +qai +lq +xqhnk + +gu +ugp +ug + +klvxuwscg +kvgslxwcu +xcgwulvks +wulgxcvks + +wmnhyu +tdyhxvkc + +oaq +oqa +adqo +aqo + +nyi +wsl +i +ri +zf + +btfdzqxpskhviyo +agjyxruvpdilqoswk + +fwcsbydqlkipejh +ehbpidfwjkclzys +lfwmdepbhjiakvsy +jedyfwpgbihls +dtisfhlpuxjoenwbyr + +veifzdrlqxn +tckliywjhngobap + +wgnmsp +ngmwps +cmsgnwp + +zxvljcnetoakbfqw +dzjfovcexgbaknlqwt +qelvwxckfbtnaojz +wtockbxaezvfjlnq + +gmceodryf +dmfbywnvus + +avx +xav +avx +mzxav +xva + +ctmiqovawrydlxbekh +bydemtwcoqrklhiavz + +twx +xwq +mdvfowhk + +fgqwkstldzmcxon +zmdkxfgoscqwltn + +vylsuqgaripwxbohejzk +rofkhzuqxbwsvpagyt +kvpswrhoaygzbcxtuq +gswqzhxofprakvuby + +x +x +x + +kwcsmgzxfqdiorab +kxdawsocqbr +rhxvoastqpdcubkw + +bfeaqczjvt +azkjqwoercf +czastxvnmfjqeyl +jeqafzcxnst + +gpemfwkaz +pmgwzeka +regzaonyc + +jhmaivsq +paxqsbev +vaiqs +sqvhia + +abqnlgzroie +oigbzqlnuaer +ljobnzayridqgce + +cndveqaglm +meaqndljvcg +lnvcdagqem + +nyklzsdig +bgxhqidzukln +nzlykdigr + +jwqmrfcvay +rylwfmavc + +rwftqvskhylxmbae +pgxlzaywnqorvhfmitskjc +ybarkftwvdlqxmhs +aqwvtuxfslrkmhyb + +n +y +np + +nefprhauytbcoz +rucpehbntoyfaz +hezyucarptonbf +rahfuxtneyjpzobc + +zkwylmvsi +hxakrjm +rktm + +zgfhmak +jqhukg +dxnshlvrpgbk +khwzytge + +lkry +dykltxnor +keulrbqm + +td +td +tvxgdamz +cdtp +td + +xdhmnfgbkjaursotl +gzaonesmkjrxdhclb + +wsixtvoqm +nlbkf + +cxilrsjbzquov +jqcsirybxovluz +vxruqzsijlboc +oxqvsiczrujbl +bhulrzcxivqosj + +wiylpn +nlpwi +iwnlpk + +pniluyobxfvzdta +zmweqgkchrodjtisnu + +rplgxefjosmhdkuzn +cdbpszvhtrawjyqgi + +tweaqxrbf +qyhrkwbuftxea +eyqaxhwftr +frwtzqxane + +yqcvukg +cpuvgkqyo +vuqckgy +cygukvq +kucqvgy + +nagfcwoyuplivxzsbe +xzswvyianfbepuolg +xaovpibgzufnswley + +qpgre +ruqe + +pc +tpwaroqsc +ncyzbiehplfg + +eykizclxhovd +kzlcxhdvyeoi + +m +m +xm + +teyvjkxclfiazshqdrp +zkjvflpqyretxdisa +yetspzadjxvkirlfq + +nqjykmcu +pkytihj + +qypkcxsoetmvnwarjiu +tkfjapegswrbqndzlmh + +gfatnypkol +obasqczptgnik +tgmkewxupojanv + +kn +kn +kn + +mwjcfkgy +wfncjkgmyt +ypcgmxwsfj + +iqsbwkyezrhfc +rhwcqkbefszyi +kibyzsfrhqcew + +opxftzlyceqvnahg +xncgzyqeathbopvl +nyzgfvxdcapeqhtlo +jycxtvlqonezpgah +dhaytonpelgcvxuzq + +vjcwy +vw +vwmps +kzdwgievaxh + +lp +m +p + +mxraeksqfvozb +lyxsfbkiramh + +k +dk +qki +k +k + +clgqtvawnzop +pnclqvogzyjswta +xzqcmnlwvaoigpt + +htv +vht +thv +tvhdw +tvh + +fontbezgmcwli +clgezmnwfit +inzgceflmwto +iwtmncvrygze + +zhotuercknvpfwal +nklerdafopcuvwzh +phvwkfeazoucrnl +fncorhvpkeauwzl + +egqjtbi +xgmt +lpudwoakt + +nzpyhsfbijwelckumxv +gcwbmzpxlevjksnfyuhi + +brivn +ojrinbv +irnbv +irvnb + +xziegsqjdy +xsyiedqjzg +dgxizjsqye +eyidzqjgsx + +crmdneqtojv +ormadvcj +lokzjvrcwsm + +taqlnfvh +ylqnvfhtaps + +aghxmfuo +hgmrfoux +guxohcmf +fxgumcho + +w +w +w + +lxw +lwx +wlx +wglxo +xwl + +gajyxn +agjnxyu +xgjayn + +fporwxgqdkih +dovpaeythlnwkz + +hkmut +uitmkh +htukm +thkum +mkhtub + +aepugjlmbkrszfv +moflauznjbrp + +dwl +hdwf + +mdpyheoa +opmayd +opadym +ypdmao +yomadp + +vt +lh + +fc +cf +fc + +gcspkvqxzntea +vxztpqcbsgknaeo +pacmnsezkqltgx +vextncpskiazqbg +xcngdatejzrspq + +azjuwiqtgxysvkh +iayswhobudktr + +xbeijk +bjxeki +iekbxvjq +kixejb +ebxijk + +gi +gi + +ebgutwnkjx +jbkzgtnaxyewu + +pasecmxbjrtvqkznwgh +jcrmpagzvqhetoksxwn + +glcverqzhbdij +ljzbgiqhecr +bcgqzerijlh + +sbkjoza +as +seqaw +hags +qas + +swcbpyi +ipcswby +iwbpcsy + +x +x +x +x + +lnju +ul + +hfvimysr +hfryisvm + +qhzdvuiacyxw +kqbdwfizyvua + +txeouhancpqbgjwlkmfs +mdbhoapjuclrwsngftqex +ecijlguqfbmwoxnaspht +qapehxvtoclbuszmjynwgf + +mtuilgpbkjnav +vktduhmynlabj +vujxmtikanlb + +mcrebzdwvxs +kndlxj +nxtad + +w +lq + +bdajvilhso +jisoqhld + +jurqv +uhs +spuh + +kuwgybfixdzs +tifnobygwlpeqx +xbihfwvygjda + +hckgfqlbo +ntgklfbhrqso +zkjgoflqbh +ckbqmgfohl +fwqkolbgh + +stan +tsaqnd +sant +asnt +ntas + +rfxqzjdvy +zrjfx +jbfrxz +jrzxf +rxjefzg + +ixql +dtqrs + +dbhkjqez +eqcdjbnk +eqjlbpkd +hqjdbeyk +djoktmqsawbuexfvgr + +xfzwparuv +wxrzknavo +xrazwpsuv +rwxmtaivz + +qhrzt +tdyuamxrnihc + +ojc +j +j +jr +rj + +ipgxrlsakotynbmv +bgortknxyuplmsiv + +qowdhilapmk +lwaqkhpimdo +ikpwmqcdgohal +dpilrwaqkmoyh +manlwoiqphdk + +b +cb + +swqtmuhygd +nxqgsyehdtumwr +stgudwmqhfy +gytmswhdfqu +mwhtydgqus + +t +vb +im + +drxzwkcg +xdzr +ialdzxr +zdxr +rxuzd + +fzlpvcm +fvoplc +bcflvp +vyfipcbl + +opfkbmxsvznguaq +mpufsqbnvgxao +smxgofbnaqu +rqoadwbhxmngusf + +xpelhcvbgfwzos +losftcbpewzmxhy + +kvjia +jviak +kavij +aikjv + +ukp +pku +kpu +pxku +upk + +nahgyxbfijdzukrtlewvc +ilrhdujgvcaywbfxkto +ugdrxacbkwthofjylvi +xdtaiuhjcvfgkyrblw +ubhrwaivcfxdkjgptyl + +wbs +ws +wzpjs +rsw +swx + +ecovmudkg +dckvuomge +cgeduvkmo +kexrumgcvold +ogdvcmkeu + +otzhibuwylnpdjk +fqesgmvcx + +uhibntjedrqlkza +zutlekqijbhadnr +lrudvhnxtqbejiwkza +knqdjlhzbrtuiaes + +lzucndsk +kudnslz +dculwnzsk +unpzdlcyk +qutlnrhdkgb + +imvdyc +uym +myrebic +jywxqosan +biry + +e +e +ey +m +ey + +pu +pu +up +pu +up + +nxywbazjhfpmqrl +ptlnhfrjzbqioy + +jhqrpnacxktuywmzolbgid +rcldaozfinhtywukjmgxpbq +xknlraouiemtcjwypdvzgshqb + +hjtbfsawmyqreuxzp +zkmrxelqbfgaijyucvws + +tmuodpivjkbesrnxwhgqly +gkhvptmqodbicuwjsxlr +upilsotvgqmdbjxkwrh + +uchfkdwgvoysazr +ekgnrmjidtphxzlbq + +peynjb +jdetnbha +qknrlxemosb + +okcxgpmeva +camkegoxvp + +ivetwsloarduh +etsdjwviqoau +tsmfwviponeakxdu + +vxoukn +oxvunk +uonxvk + +l +l +l +l + +xpates +pnavtsw + +p +w +u +w +z + +erqphaigsvmkc +aigprevkqmynhsc +pdarkzqcsvbgmeih +gpiemhafqrcksv + +gnfxpcvhyeqklb +nlyegofxhcpkb +pbfckgywxnlhoe +lkshmjptifecnydugxbza +ychrlgnobxkpqfe + +fswnqiyamkrthzeudxlgvocj +ytdzglurakxihjcnfmvesow +wtclfvjgmksuinzxehrydao +gkhzvswmiayludfcexnorjtp +zudegfksxvlnarctwmhyoipj + +hkvuctrxgeqbapdsw +peqskrducgvhxwj +oiqmhekpwvxdcg + +vxzygrsldmjoq +pmbfvrjzktnsyql +rdymqlvjwzs +zomcjlqyrvsxg + +t +x +t + +hidmjcszvwtyulexap +vxpuhsmtiecygjarzd +yipxsazecjhtvdmuk +tveujidzswpmhbycoxa + +bjhowspnxqrilgckzvya +lycxpnjrbvghiwzkoqdas +gnljyzbxswqvkcaoprih +urpoiljxsvagbfkqyhzmcwn +lnjxibqrcpvgszkyhaow + +rxdjupsboghfyqk +ghpcktodiysbaf +pygdfskohnrb +swohdkpgbxmfyez + +qfoyjsuiwglp +dsajgouipqfeyxwl + +ybv +sh + +akgwp +neftcidsmlxvyu +jpb +pwr +oghzqr + +m +m +wm +m + +aesucfwnbmzjixol +lwcsejaniomru + +skrij +rjisk +ieszonkrjbv + +sqil +weulqzi +sqicyl + +hcouimv +moiucvh +ouhvimc +iuochvm +ugihomxcv + +xcdq +kvlwysm + +s +d + +faqkwzdphtslbrm +bsmryfzpkohlnaq +uqghrailbmpzfjsckxv +skdempaqhyflzrb + +iftersaovkmq +itrosfkmvaej +bavftmiosrke +kuvtrsoajfmei + +qi +q +qiw +q +qx + +cbmhaqsynzlkep +ebclhpqsnamzk +kbeunmspclqhaz + +k +k +k + +lsjd +djls +sldj +sljd + +m +m +m +m +m + +tnkdizrqy +injdbgtk +tcisnwa + +oimrgebk +objmgrik + +gzpfiuentbvyrcm +zcysfenlprbutmvg + +iakzlspqyfdoxghevnwctu +vuwhodnxyfqagtzpsceikl +tflnyxasiozdgcvuheqkwp + +a +pygardx +eau +a + +maht +tpmh +hmt +thm + +ociwpsvnjykabufmrgezqldh +famcsnzgvlebjyhroqkpdiuw +zvojpcqiufwkrgydnasemlhbt + +upkhlt +slea + +wxukirhvlfmgo +exykvrhugdblomfw +hlkizfomvgrwxus +sholafwvmukgrx +txwfsmurgvkohl + +ju +l + +wzpf +qwmef +wfe + +ewmxovgbcnijhyk +uklrsgdyzcaeft + +baflvedsuohztjx +lqvzgwxsatefdc +saxbltdefrivz + +cdvmaqkngy +tfrdgkam +agdpmkys +kdmcjag + +ajnpf +fnpaj +fnjap +fpnaj + +waslqkuv +uvwsjakmq +pvyuitqrbwcagoxkzeh + +pcaowt +optca +pacto +poatc + +ephg +gphe +gehp +cespgh +gphe + +bcpo +edcps + +famtdwsbrznj +jdznfrtwmbya +dfrmjawebgtphnqz +jzmnrtafudwb +rbaznwtdjmf + +qmyhwgtcepkd +gkdqtmpyfw +purgdkwoqmtl + +zhvstamfpdc +dtszpcfvamh +dzvhftcpasm + +rgwyks +yhkgfwre +yrsgxo +cadirygtn + +jzdatumwe +hclk +xirsyv +fcbkng + +dtmkaiubljq +mkivbojl +imkjbl +eklmijb + +yjtp +tjy + +jvipbosutw +josgipwkutzb +jsupowbrti +bpikjtsouw +fojtpwbsaui + +e +ehg +fe +e + +fbdpoau +ijhroufmvb +cfbtoul + +rwxplh +whpxlr +wxlprh +lxwrhp + +pncagr +rgnclpa + +vhjyokxtbpu +skuwogrqa + +yratqdoxwcpk +sorywjbenudlxhvapi + +evsktdfwogcuh +zidwgnrcelxyvjmkp + +jcezwrigomdt +hzcdjtiwre +tczweijdrh + +ukcewyhfsapozlx +wciopgukxheylazf +lwekafhuybozxpc +wyhupafeclknzxo +ezcxlkphouwfay + +klfjutwxnhvicympbdrz +npkzcituovfldxgbhwjms +txhwjkifmvuzbdcpln + +ifr +up +p +p +gswo + +xkimf +mxikf + +td +neqdi +wfz +lbsahjokvmpry + +wez +wez +wezr +zwe +ezw + +stfjbc +twfjbcs +bstjfc +tbsfjc +sfbjtc + +asjbkpugrnteyfcomdlh +yoadpfjmubrkltgcneshz +lkrfnpmteyjcsubgzoadh +xghijfescdwtoykpabumqvnrl + +ug +du + +qrvyi +nv +v +vhz +zvm + +uoblqtenkysjdcwmraivfgpzxh +pckigqsolvfnmjauyzhxtwdebr + +wdkrlgqmvuhicnxebatj +rcdvkftqnuiewh +cntediyvhwukqr +vrhqpsiounecwtdk +ounreidwqchkvt + +arelvfzbhkdinoxtgjpcsu +szocvdbfjhranixtkelpug +einpchxzdrktlfubgovjsa +cvbnriuosehxjgdlkpztaf +uzdfcxejbhtvolknrspiga + +dsxcfuzphk +roifcp +cyifvop + +jmil +limj +ljim + +smrjzlwuikq +holtfauyim +umncpieftbl + +kq +wkq +k +cktp + +zoncjltqxyhasigkfwurbmdv +uhbzojkagtxcvdrwlsfynqmi +xhlyswojgrzcvktbfqidaumn +qtgswjoaivybnhcfrxklmduz +nhvwitqxalkjrdmsguofcyzb + +su +nhu +us +u + +stxofjnyvhizmelagbdwpuc +rbfnweycogqztipsaljxkd + +rmyclkwgqfheja +qgjucrzyemlwakh +kphqegadcwmuryj +taxrkcevbqghjymw + +lugcahsyrjnoxpzem +espgjrnyzcuhmlaox +jmgrcnsazoehlxup +nfepgjluzhcadxmrso +srlnjcpzmeoghaxu + +bcqrkadhz +dcbhkza +hzndimkac +dqkczhba + +qglersz +vszlehq +zfjueilqsd +eszlq +zsqler + +twcekgfq + +rcmyhawqtgbjiflpxezn +aelwqgjmtzycrfpnhxib +xnrfbgjtqzyaplmchwie + +yhacs +mawnvjkeyqcighs +tuahycs + +iw +tdgkpi + +nizjlemapcwx +tsuoqkjbhygdv + +pyusefbwjrvgz +bjfzpwsuyegr +jrsxohcegwfpzuyb + +ekxdmsjzuntai +zxdaujmtnikes +jndizketuasxm +njqakpsuzitefxrgdm + +ehvknu +hzukmn +nbtdksxrg +akn +naehok + +wipbuyzs +ysbq +dxyqbjst +gsyxdb + +smhkvxwtgj +htkgmvqsxcj +tujghmsxikv +hxvsmytgkjd + +ynm +un +ykn + +qebgu +qgrblhej +uhrq +mnfokqxy + +mcvy +tsaup +us +kqhw + +vwm +mvjwq +cmswv +vwjm +zwavm + +enfqx +enxfq +fexqn + +xsmzl +bqpoejwhzi +gxzc +rfzn +zrv + +oueayjq +jyu + +xrzqts +rz +yegnbuz +cjqwzxisr + +dnwqumcg +kntyfqhm +tnmfq + +sy +xh + +esknr +brpym + +syh +yia +ykn +bpmyzo + +ebhmyz +mebyhz +ezhybm + +omzvarex +mzoarex +mrozaex +zaomrxe + +fecarzihbklsodvp +vdbhpaizlefrsc +rfeiapvszdhlbqc +sfpbaiqvchlrdze + +zvjxlgfokbhupn +aluigxdtwqves + +cseko +ose +ecso +wsegjoa + +bmdru +nw +nia +ija + +lnapozb +anpbzolhy +zrbajnluop +lopznba + +iuhorckt +dsitafk +xlkvefit +dfikxzltg +lktniv + +ibgjqwx +biwqgjx + +ofpcnjzmwxtvglbysuqrkadh +qfghmrdljbksxzovuawnctyp +tqxkvnmrjgpahylcsbdzwfuo +uqxmlkfdnrjovatsgzwpbhcy +jfsagdqxrvpcnohubkzmtlyw + +nsofzrtgc +fjtcsgoni +ftigacno +houpnqfcgt +nfctgvxlyom + +gtlrszh +tlghsrz + +ciygwfesbtv +hvcyb + +otupmldwkhbvyxrni +bdwthuylsvpxkmnor +nxktbmlyvpdhwsoru +mkbantvwxyguophdrl + +vlx +xlvh +lxv + +falrxm +abrml + +cz +fe +ltxz + +zh +hz +zh + +vlpungo +vnploug +nvupgol + +aihvwxomyseqjrup +vxtbglcnhoewqszud + +evdfhlanzowmj +wjfakoizvlyume +jeadzfswclmvqo + +vofnaxpuqdjzk +tkxouzdqypvaf +sfaimwuoerx + +yiqjnrmwg +cnkzxdebopls + +mxuyznpkdslobfqethjvgcwi +dhygwolniuzkmfqtjbexpcsv +jtnbavpgulcsfwzmeydkixhq + +pwqcdsagneux +apwdslczguex + +ochfgitkpjmxvbwsyalz +pqfoehjmklytngxzsa + +zwcdvjyuxm +jvxuczdm +jcuxdmzv + +ex +xe +ex + +bruqxpnt +rtnxqu + +cqmpedhtwa +hjnweafbtmydckvgi +coxdwrplmheta +owmdqctaeh + +eonvhayprlubmkdxcwqgt +mbuqcnylwxekorvtphda +ltqohvydpemxknabwucr + +bviypkgrtaucmjeo +jpsbalymxkfcvdzoie + +vxlqyrfp +vqplyxfr +yqrplxvf +lvyrqxpf +rwqplfyvx + +x +x +x +l + +yuvo +oyvu + +dqevksywtmajxhuorncgziflb +saberqxvnhjiwkgdyzfltc +kvyjwgqcathexndlzsbfri + +rmpl +matsrkl + +dqw +dwq +wpdq +wjsdq +qrkwd + +vmoltnku +wnatmlzqgo +nvoutlm +ontxmvl +tolxmn + +rjqvugxpbwd +jgdbwsprqvu +jdqupyvgwrbe + +mkibxclpud +cumrkl +hlztkmasvcwguo + +ju +u +u +u + +hvoizamdru +puqftvdjr +rgwsctbvdukf +vdlkrpuxte +rjxvwybudq + +th +aqbf +tqfkyv +ocw +lnxzijmpu + +isdxlmekbpyvrazoqngjhfw +nczselimvurpbxoywgafhq +ymbhasxeliofwqgnrpzv +xmpnzhyiablsqerguvowf +vumoseywazfinhpqblxgr + +w +juv +wi +c +vw + +fjx +fj +twayjeqo +jhx +jzr + +w +cq +fj + +pnysjzkwmeaxgtirdf +itgzyernwxkapdsfm +rbkawofqxsinmzytgled +sfnxytiwzmgakerd + +ygnmzdhkxpe +zktnlepuh + +jsbfpuwvkiehgr +ejkrifnwvbgshplu +vcjbhsigfukwpre +pbjfhesukgwvri +wvkrsbeugjhipfy + +oxzwnftk +oxwt +wouxt + +nycmubiopg +gbutcomnyp +uboypnkcgm +poxndgyubmc + +wpodjnyhtqukexc +ihjlvwdfguzpnxaet +tojydphkwcxnuem + +dfyopwrhjcmxbiku +mbawgjorfhpildyucx +uihbwdocmvnspyqfx + +brgjymfaw +vrjywbgpf +ywzbjgf +ibeckofyj + +sktrbg +ulyndkbs +kuvzabse +jpbhxsomck +ksbqfi + +lrkbaizhtpguwjq +vgnouwhlabzirkpjqt +tukpjrbzaigqlweh +ulasbqtpwhkzgijr +zktiwbjuqsahlgpr + +ipasgukbhcfwlt +gzswubeqcalpif +wpslbiguxaemfc +napwlgqfisxcbu + +tgcirbmwx +agxyqrmwztc +qgxmczwtr +fnoxrwgjklmtec + +iqthapgwsyzumejnd +dxfvsceugokqlwmbyzjpr + +ixms +mpsi + +gjoxrcmt +xrjgtomc + +rxikogsafteqbupm +dgtqnkwescbrpmojafzi +regptqlkaisybmfo + +gcsnyeojwl +ljeoyhcng + +rboeafpxktihsqnc +fhjokdgqinwze +oihfmkynqxe + +rjuyhaqmliwckg +ximcfzgwyrlhn +hlrgtcsimwxy + +wpfqculrmxos +cojqs +qcszo +ozcsq + +ilbezokgtpwmu +rkdfphtzcyw + +xda +bfqugt +eadh +h +h + +ejvpamsgd +dgemiloau +dmeasg +jademg + +jfagcbmxyl +bycfgjlmax + +gobmlcir +roicglbp +bicglro +ciobrlg + +jiqowhr +mbiqr +qirm +qrbil + +eamlhtgvzsjoxyuinrpwqbd +btonqpwgjamhrlsixyvzdue + +rhnamzcvkqbdpftgwi +tmbpkihdwzagvrfnq +wkpdtzqmfgisbvnarh +mwkbihgpfrnadtvqz + +pdstumbzqalr +amzqwdrutpbls +rqubzdpatmsl +stzprabdmulq + +lf +f +f + +jdegpfinlz +xplfnegdzj +gnalepfdzj +xjeldpzgnf +zdspgnfwyelj + +ubly +neqswi + +efrjdg +xwdrbtj +xkjdvb +pjuadqo +dbj + +yrwq +yqr +rqy + +vsxcwouzegqak +ynfcl +lrbc +rcjh + +ikxnftdovcphzae +adpitzckovxhnef +cilfohenpdzxtvka +ehitodpkvfzxcna + +te +famtuj +intfreudw +sxopkqgbl + +pmjsxaekqlrdobwufnztvg +wuqrkvbgopatsemlnzxd +svonbdeqagtzwlpcukmrx +ksuzlaernbcwovxgqdpmt +wxetnlqazbpgskvomdur + +skpvxloqduizwatrgfnyc +xaeyvgcfwpikoutnd +gyanbjxwmitocpkufdv + +ntuwlfqjyvrak +txivfyoldejunacg + +n +q +q + +sidtzk +lzsondqitk +tskzid + +hopdv +hpdo +ohrcdp + +ncdj +cjda +ydkjrv + +brtahsneojzq +zejbnswvqoahyxr +rmhosqeabjnz +aebsjoqtmzrnh + +a +yq +mj + +zmcfrgsxenlkja +vupsyjwrhq + +grbxsd +kpsygnarx +rjbgsex +ejvgwlsrx + +dqrzwiux +iurdwz +uidwzrp +zwidrum +uwzrid + +exmywtp +wempt +tpwem +tpwme + +arlhfxdcmv +vsmrhclkqfi +vrcphfmadl + +kylhz +zly +zly + +tal +tal +a +al +daevb diff --git a/Day 6/one.py b/Day 6/one.py new file mode 100755 index 0000000..c8768ce --- /dev/null +++ b/Day 6/one.py @@ -0,0 +1,17 @@ +#!/bin/python + +with open("input", "r") as input: + sum = 0 + answers = set() + for line in input: + line = line.strip() + if line == "": + sum += len(answers) + answers = set() + for char in line: + answers.add(char) + + + sum += len(answers) + print(sum) + diff --git a/Day 6/two.py b/Day 6/two.py new file mode 100755 index 0000000..b37510e --- /dev/null +++ b/Day 6/two.py @@ -0,0 +1,20 @@ +#!/bin/python + +ALL_ANSWERS = set([i for i in "abcdefghijklmnopqrstuvwxyz"]) + +with open("input", "r") as input: + sum = 0 + answers = set(ALL_ANSWERS) + for line in input: + line = line.strip() + if line == "": + sum += len(answers) + answers = set(ALL_ANSWERS) + continue + + answers = answers.intersection(set([char for char in line])) + + + sum += len(answers) + print(sum) + diff --git a/Day 7/input b/Day 7/input new file mode 100644 index 0000000..292157e --- /dev/null +++ b/Day 7/input @@ -0,0 +1,594 @@ +light orange bags contain 1 dark maroon bag, 3 dim maroon bags, 5 striped green bags, 2 pale aqua bags. +wavy bronze bags contain 3 pale black bags, 5 bright turquoise bags, 4 pale orange bags. +dark coral bags contain 3 bright lavender bags, 1 pale bronze bag, 2 dull blue bags. +dim chartreuse bags contain 2 wavy plum bags, 4 wavy teal bags, 1 dark crimson bag. +striped indigo bags contain 4 posh aqua bags. +shiny lavender bags contain 4 bright yellow bags, 4 muted salmon bags, 1 dull chartreuse bag, 2 dark chartreuse bags. +clear gold bags contain 3 dotted orange bags. +dull maroon bags contain 3 posh green bags, 1 shiny gold bag, 5 light salmon bags, 1 posh teal bag. +light plum bags contain 1 striped plum bag, 4 striped cyan bags, 1 light turquoise bag. +posh magenta bags contain 4 drab black bags, 3 shiny violet bags. +posh beige bags contain 4 dotted maroon bags, 4 dull fuchsia bags, 5 clear teal bags, 2 dull beige bags. +mirrored gray bags contain 3 shiny tomato bags. +dark magenta bags contain 1 dim brown bag, 3 faded gray bags, 1 dim teal bag. +plaid teal bags contain 5 mirrored indigo bags. +shiny bronze bags contain 3 clear orange bags, 2 vibrant coral bags, 1 pale olive bag. +muted aqua bags contain 2 dim maroon bags, 4 dotted beige bags, 1 pale turquoise bag. +dark olive bags contain 2 dotted tomato bags, 1 drab coral bag. +clear lime bags contain 4 striped crimson bags, 5 mirrored fuchsia bags, 2 striped chartreuse bags, 4 wavy aqua bags. +posh bronze bags contain 1 dotted green bag. +shiny cyan bags contain 5 dim maroon bags, 2 light orange bags. +vibrant silver bags contain 1 drab coral bag, 2 dull olive bags, 3 clear brown bags, 3 bright violet bags. +mirrored red bags contain 1 dim beige bag, 5 vibrant salmon bags, 5 muted bronze bags. +striped bronze bags contain 3 clear cyan bags, 4 wavy purple bags, 1 pale orange bag. +pale gold bags contain 5 light cyan bags, 2 dim gray bags. +striped purple bags contain 3 clear gray bags, 3 plaid tan bags. +dotted orange bags contain 3 dark maroon bags, 1 light orange bag, 3 light lime bags. +clear gray bags contain 3 plaid aqua bags. +dull red bags contain 1 mirrored blue bag, 5 bright lavender bags, 1 wavy aqua bag. +dotted tomato bags contain 5 pale black bags, 2 clear beige bags, 4 drab yellow bags, 4 dark crimson bags. +wavy maroon bags contain 1 faded cyan bag, 3 dim brown bags, 2 striped magenta bags. +plaid turquoise bags contain 4 dark maroon bags, 4 plaid fuchsia bags, 5 muted cyan bags. +clear tomato bags contain 1 pale bronze bag, 1 plaid indigo bag. +pale magenta bags contain 4 striped black bags, 3 shiny orange bags, 1 vibrant teal bag, 5 plaid olive bags. +dull purple bags contain 2 pale silver bags. +bright fuchsia bags contain no other bags. +striped beige bags contain 1 dotted aqua bag, 1 wavy teal bag. +dim tomato bags contain 2 dim gray bags, 1 faded bronze bag. +dotted coral bags contain 3 faded gold bags, 3 drab tomato bags, 1 dark crimson bag, 1 wavy purple bag. +vibrant bronze bags contain 2 dim fuchsia bags. +dark white bags contain 4 dotted tan bags. +bright teal bags contain 3 posh tan bags, 4 dark bronze bags, 3 striped white bags, 1 dotted silver bag. +striped silver bags contain 3 vibrant salmon bags. +plaid crimson bags contain 2 striped beige bags. +striped white bags contain 5 posh tan bags, 3 dull aqua bags, 5 pale black bags, 1 plaid gray bag. +striped green bags contain 3 dim maroon bags, 4 light lime bags, 1 dark crimson bag. +vibrant violet bags contain 3 plaid cyan bags. +muted silver bags contain 2 dim coral bags. +posh gray bags contain 1 clear tan bag, 1 light crimson bag. +muted beige bags contain 4 drab tomato bags, 2 dull aqua bags, 3 pale tomato bags, 3 drab coral bags. +faded salmon bags contain 4 striped lime bags, 4 posh cyan bags, 2 wavy orange bags, 3 dull lime bags. +posh lavender bags contain 4 faded coral bags, 2 mirrored cyan bags, 3 drab cyan bags. +shiny tan bags contain 3 dotted orange bags, 4 dim brown bags, 4 dull silver bags, 2 plaid orange bags. +vibrant gray bags contain 1 clear yellow bag, 1 mirrored indigo bag. +bright crimson bags contain 2 drab orange bags, 1 drab lavender bag, 3 dull black bags. +muted black bags contain 2 dark chartreuse bags. +vibrant orange bags contain 1 dull salmon bag. +posh tomato bags contain 1 dull coral bag, 4 drab salmon bags. +light brown bags contain no other bags. +shiny green bags contain 1 light crimson bag, 3 shiny purple bags, 5 bright turquoise bags, 3 light brown bags. +posh blue bags contain 2 mirrored lavender bags, 3 posh turquoise bags. +dull lavender bags contain 1 pale black bag. +faded magenta bags contain 3 dull beige bags, 3 light plum bags, 5 mirrored turquoise bags. +plaid tan bags contain 5 shiny purple bags. +plaid green bags contain 3 shiny brown bags, 3 clear brown bags, 3 posh brown bags. +pale red bags contain 2 dim violet bags, 1 clear tan bag, 1 shiny aqua bag, 3 muted cyan bags. +dull olive bags contain 2 bright fuchsia bags, 2 faded cyan bags, 2 striped crimson bags. +dotted gray bags contain 2 bright fuchsia bags, 2 drab tomato bags, 4 shiny violet bags. +dotted plum bags contain 1 muted magenta bag, 4 dark yellow bags, 5 clear aqua bags. +dim coral bags contain 1 shiny gold bag. +light white bags contain 1 shiny aqua bag. +dim yellow bags contain 1 dotted teal bag, 2 striped orange bags. +striped lavender bags contain 2 faded silver bags, 2 dim lime bags. +light turquoise bags contain 5 bright brown bags, 2 clear brown bags, 1 drab yellow bag. +shiny yellow bags contain 5 drab red bags. +plaid maroon bags contain 4 wavy orange bags. +clear beige bags contain 4 wavy teal bags, 5 wavy purple bags. +dull fuchsia bags contain 1 wavy lime bag, 3 faded turquoise bags, 2 dotted blue bags, 3 dull lavender bags. +pale black bags contain 1 dim maroon bag. +vibrant blue bags contain 2 bright brown bags, 2 dotted aqua bags. +vibrant tan bags contain 4 clear tan bags. +clear silver bags contain 1 drab lavender bag, 5 dotted green bags, 4 muted lavender bags. +mirrored plum bags contain 4 dim yellow bags, 1 wavy lime bag. +pale crimson bags contain 5 shiny gold bags, 2 striped chartreuse bags, 5 bright brown bags. +faded chartreuse bags contain 2 drab teal bags. +plaid plum bags contain 5 light turquoise bags, 1 muted indigo bag. +vibrant indigo bags contain 3 striped tan bags, 3 striped crimson bags, 5 clear olive bags. +dotted turquoise bags contain 5 pale brown bags. +muted brown bags contain 1 light chartreuse bag. +mirrored black bags contain 3 striped black bags, 3 dotted beige bags. +faded silver bags contain 5 dull violet bags, 5 bright salmon bags. +dotted blue bags contain 4 light beige bags. +faded maroon bags contain 3 wavy tan bags. +pale purple bags contain 3 drab yellow bags, 3 shiny orange bags, 3 striped orange bags, 4 striped chartreuse bags. +muted white bags contain 1 posh chartreuse bag, 1 dim silver bag, 4 posh bronze bags, 1 striped black bag. +wavy violet bags contain 4 posh yellow bags, 3 wavy gray bags. +wavy silver bags contain 2 plaid gray bags, 3 muted bronze bags, 2 pale magenta bags. +dull blue bags contain 4 pale silver bags, 3 mirrored white bags. +mirrored gold bags contain 5 striped bronze bags, 1 dotted orange bag, 5 clear black bags. +dark silver bags contain 2 plaid aqua bags, 3 dim purple bags, 2 shiny maroon bags. +striped olive bags contain 2 vibrant coral bags, 2 clear beige bags, 5 wavy chartreuse bags. +bright cyan bags contain 4 faded orange bags, 2 dim maroon bags, 3 pale chartreuse bags, 1 wavy plum bag. +pale salmon bags contain 5 faded maroon bags. +plaid orange bags contain 4 plaid cyan bags. +plaid salmon bags contain 2 clear gray bags, 4 drab tan bags, 2 clear beige bags. +muted turquoise bags contain 4 mirrored teal bags, 5 wavy bronze bags. +dim black bags contain 1 drab violet bag, 5 pale bronze bags, 2 dark tomato bags, 1 dull turquoise bag. +wavy lime bags contain 1 dim lime bag, 1 wavy cyan bag, 5 mirrored lavender bags. +wavy blue bags contain 2 dark maroon bags. +wavy turquoise bags contain 5 light black bags, 2 plaid green bags, 3 clear gray bags. +dotted teal bags contain 4 plaid indigo bags, 2 bright fuchsia bags, 2 pale lavender bags. +shiny tomato bags contain 4 clear beige bags. +faded cyan bags contain no other bags. +bright yellow bags contain 1 shiny tan bag, 5 light black bags, 3 clear olive bags, 5 drab turquoise bags. +light salmon bags contain 1 pale black bag, 1 wavy cyan bag, 5 pale tomato bags. +drab cyan bags contain 4 drab aqua bags, 4 mirrored cyan bags. +vibrant plum bags contain 5 striped blue bags, 3 drab lime bags, 3 dull turquoise bags, 1 dotted red bag. +faded lime bags contain 5 shiny teal bags, 3 posh purple bags, 4 dim aqua bags, 4 plaid white bags. +dull gray bags contain 5 wavy fuchsia bags, 3 dark yellow bags, 4 striped tan bags, 2 dark olive bags. +vibrant lime bags contain 1 vibrant violet bag. +vibrant chartreuse bags contain 3 mirrored aqua bags, 2 vibrant white bags, 2 dotted orange bags, 2 faded beige bags. +dim fuchsia bags contain 1 clear brown bag, 3 clear magenta bags, 3 muted beige bags. +plaid fuchsia bags contain 2 plaid blue bags, 2 dark violet bags. +pale lime bags contain 5 wavy purple bags. +wavy aqua bags contain 1 dotted red bag, 1 plaid tan bag, 5 light purple bags, 3 shiny green bags. +shiny silver bags contain 4 wavy purple bags, 3 dark violet bags, 4 drab yellow bags, 5 faded cyan bags. +muted lavender bags contain 1 dim gold bag, 1 clear yellow bag. +striped red bags contain 1 striped maroon bag, 3 dim silver bags, 2 dim lavender bags. +faded bronze bags contain 2 dark olive bags, 3 mirrored lavender bags, 5 light tan bags, 2 faded cyan bags. +mirrored indigo bags contain 4 posh olive bags. +dotted salmon bags contain 1 plaid silver bag. +dotted purple bags contain 2 shiny violet bags, 4 plaid olive bags. +posh fuchsia bags contain 5 mirrored indigo bags. +shiny indigo bags contain 3 dim turquoise bags, 2 dark maroon bags, 3 vibrant tomato bags. +drab green bags contain 1 dull salmon bag, 4 wavy chartreuse bags. +dark tomato bags contain 2 faded orange bags, 5 wavy indigo bags, 2 dotted red bags. +bright black bags contain 4 bright salmon bags. +posh yellow bags contain 5 pale chartreuse bags, 2 clear cyan bags, 3 muted bronze bags, 3 light tan bags. +light crimson bags contain 4 dark violet bags, 4 striped crimson bags, 5 clear tan bags. +muted indigo bags contain 5 pale black bags, 4 dark violet bags, 4 light purple bags, 1 dotted gray bag. +dark green bags contain 4 posh brown bags. +pale chartreuse bags contain 5 bright turquoise bags, 5 light purple bags, 4 clear tan bags. +clear red bags contain 2 vibrant aqua bags, 1 clear brown bag. +faded purple bags contain 5 dim gray bags. +dark gray bags contain 4 shiny maroon bags. +drab aqua bags contain 4 dull aqua bags, 5 striped tan bags, 4 mirrored indigo bags. +muted coral bags contain 3 plaid fuchsia bags, 5 drab coral bags, 1 dull aqua bag, 3 light tan bags. +dim red bags contain 5 shiny purple bags, 3 posh olive bags, 5 clear turquoise bags. +muted gray bags contain 2 clear lavender bags. +mirrored purple bags contain 3 faded salmon bags. +wavy cyan bags contain 2 plaid aqua bags, 5 dotted tomato bags, 2 bright fuchsia bags, 3 clear tan bags. +faded coral bags contain 4 wavy tan bags. +posh chartreuse bags contain 1 dark green bag. +light blue bags contain 5 dotted orange bags, 2 striped orange bags, 3 faded bronze bags, 4 dim maroon bags. +mirrored lime bags contain 5 drab lime bags, 3 drab aqua bags. +plaid purple bags contain 5 dull orange bags, 4 faded aqua bags, 4 vibrant white bags, 2 muted cyan bags. +wavy green bags contain 1 clear yellow bag, 3 striped crimson bags. +plaid gray bags contain 5 pale chartreuse bags, 1 dull plum bag, 1 dark chartreuse bag, 4 clear lime bags. +drab salmon bags contain 3 vibrant tomato bags. +dull gold bags contain 3 dim green bags, 3 dim red bags. +dim turquoise bags contain 2 light olive bags, 1 dark salmon bag, 3 drab yellow bags. +bright turquoise bags contain 1 wavy blue bag. +dotted yellow bags contain 1 mirrored turquoise bag, 1 clear coral bag, 3 wavy magenta bags, 1 plaid chartreuse bag. +drab yellow bags contain 3 dark maroon bags, 4 clear brown bags, 2 pale black bags, 3 light brown bags. +dark blue bags contain 2 pale purple bags, 5 wavy turquoise bags. +pale orange bags contain 2 light lime bags, 5 dotted aqua bags, 4 pale black bags, 2 clear beige bags. +posh indigo bags contain 3 clear crimson bags. +dotted lavender bags contain 5 pale cyan bags, 5 plaid olive bags, 5 dull purple bags, 5 light tomato bags. +mirrored magenta bags contain 5 dim lime bags, 1 mirrored gold bag, 4 dotted gray bags. +clear green bags contain 3 muted bronze bags, 5 pale coral bags, 2 light tan bags. +muted purple bags contain 4 pale olive bags. +dark black bags contain 5 dull lavender bags. +dim tan bags contain 4 muted bronze bags, 5 drab fuchsia bags, 1 shiny violet bag. +dim brown bags contain 5 bright violet bags, 2 wavy orange bags. +plaid red bags contain 1 clear tan bag, 1 dark olive bag, 5 vibrant blue bags, 3 shiny gray bags. +bright red bags contain 2 mirrored bronze bags, 3 vibrant crimson bags, 3 light salmon bags. +bright white bags contain 4 vibrant magenta bags, 3 clear cyan bags, 5 drab red bags. +striped teal bags contain 5 posh silver bags, 2 clear green bags, 1 clear teal bag, 2 pale cyan bags. +pale tan bags contain 1 dark silver bag. +light olive bags contain 2 dotted aqua bags. +striped tomato bags contain 2 clear white bags, 2 bright lavender bags, 5 vibrant silver bags. +light lavender bags contain 5 plaid gray bags, 1 dull cyan bag. +clear salmon bags contain 3 striped green bags, 4 clear brown bags. +muted fuchsia bags contain 3 drab olive bags. +dark lavender bags contain 5 drab gray bags. +light indigo bags contain 2 wavy chartreuse bags, 5 wavy teal bags, 3 shiny violet bags, 1 light lime bag. +faded gray bags contain 4 light orange bags, 4 posh white bags. +vibrant olive bags contain 2 bright turquoise bags, 3 wavy aqua bags. +dark chartreuse bags contain 1 dark maroon bag, 5 shiny gold bags. +dim salmon bags contain 3 faded crimson bags. +shiny coral bags contain 1 vibrant beige bag, 3 striped tan bags. +dim green bags contain 2 dull brown bags, 4 light aqua bags. +posh black bags contain 1 light indigo bag, 3 wavy yellow bags. +light beige bags contain 1 drab beige bag, 3 shiny cyan bags. +dark fuchsia bags contain 3 bright aqua bags, 1 pale lavender bag. +bright tan bags contain 3 drab magenta bags, 1 vibrant lime bag. +plaid yellow bags contain 5 dull turquoise bags, 2 light brown bags, 5 faded bronze bags. +plaid black bags contain 5 muted magenta bags. +wavy magenta bags contain 3 striped chartreuse bags. +plaid olive bags contain 2 clear tan bags. +dull crimson bags contain 4 plaid brown bags, 1 bright silver bag, 3 vibrant silver bags. +vibrant white bags contain 3 vibrant plum bags, 2 drab fuchsia bags, 5 dotted tan bags, 4 striped black bags. +pale tomato bags contain 3 wavy tan bags. +dull indigo bags contain 3 dim teal bags, 3 drab coral bags, 5 striped orange bags, 1 dull violet bag. +faded teal bags contain 4 dotted orange bags, 3 plaid blue bags, 1 mirrored blue bag, 4 vibrant blue bags. +dark bronze bags contain 5 dull aqua bags, 5 pale tan bags. +plaid bronze bags contain 3 light maroon bags, 4 dim brown bags, 3 plaid blue bags. +dotted aqua bags contain 4 dim maroon bags, 2 wavy tan bags. +shiny salmon bags contain 4 light fuchsia bags, 1 clear orange bag. +faded crimson bags contain 4 pale tan bags, 5 drab olive bags, 5 shiny cyan bags, 2 muted crimson bags. +dotted bronze bags contain 4 muted crimson bags, 2 posh silver bags, 5 faded cyan bags, 2 muted teal bags. +vibrant salmon bags contain 2 plaid indigo bags, 4 light tomato bags, 3 pale aqua bags, 1 dotted brown bag. +shiny violet bags contain 1 dull aqua bag, 1 light brown bag. +bright chartreuse bags contain 3 light tomato bags, 3 dotted teal bags, 1 dim brown bag, 5 muted chartreuse bags. +plaid indigo bags contain 5 posh blue bags, 5 posh brown bags. +mirrored aqua bags contain 4 muted lavender bags. +posh salmon bags contain 1 mirrored black bag, 5 dim violet bags. +plaid white bags contain 1 light blue bag, 1 striped black bag. +faded white bags contain 5 mirrored blue bags, 5 vibrant gold bags, 2 striped lime bags. +shiny chartreuse bags contain 2 faded yellow bags, 2 shiny green bags, 2 mirrored cyan bags, 5 dim coral bags. +dim orange bags contain 2 light maroon bags, 5 bright brown bags, 5 dark maroon bags. +mirrored tan bags contain 4 clear olive bags, 4 light orange bags, 2 shiny gray bags, 4 light brown bags. +striped tan bags contain 2 drab red bags. +pale silver bags contain 4 bright brown bags, 5 dull silver bags, 4 muted yellow bags. +pale turquoise bags contain 5 muted black bags, 2 bright beige bags. +pale maroon bags contain 4 striped white bags, 3 vibrant teal bags, 1 shiny magenta bag, 3 plaid crimson bags. +drab gray bags contain 4 posh maroon bags, 3 dotted aqua bags. +dotted fuchsia bags contain 1 striped orange bag, 2 striped turquoise bags, 2 plaid fuchsia bags, 4 mirrored lavender bags. +drab indigo bags contain 2 striped green bags, 4 posh silver bags, 5 wavy aqua bags, 1 posh turquoise bag. +dotted cyan bags contain 3 muted olive bags, 2 faded olive bags. +dull silver bags contain 5 drab lavender bags, 3 shiny silver bags, 2 pale black bags, 4 striped chartreuse bags. +drab lime bags contain 2 muted green bags, 4 dotted gray bags, 4 dotted coral bags, 2 mirrored lavender bags. +dotted magenta bags contain 5 muted magenta bags, 5 muted salmon bags, 3 wavy gray bags. +bright plum bags contain 4 striped beige bags, 3 dark tomato bags, 3 plaid lime bags. +dotted indigo bags contain 2 dotted silver bags. +pale plum bags contain 4 plaid gold bags, 2 posh maroon bags, 4 drab aqua bags, 2 striped lime bags. +clear olive bags contain 2 bright turquoise bags, 1 wavy tan bag. +pale fuchsia bags contain 5 dim tan bags, 5 dark blue bags. +drab tomato bags contain no other bags. +shiny lime bags contain 4 vibrant magenta bags, 1 dim teal bag. +clear cyan bags contain 5 dull silver bags. +posh brown bags contain 1 drab lavender bag. +wavy plum bags contain 1 dim teal bag, 4 faded gold bags, 1 plaid fuchsia bag. +striped brown bags contain 2 posh tan bags, 5 plaid chartreuse bags, 5 dull beige bags, 3 posh green bags. +plaid lime bags contain 4 light olive bags. +striped magenta bags contain 2 shiny maroon bags, 5 wavy lavender bags, 1 light turquoise bag. +shiny fuchsia bags contain 5 striped maroon bags. +light black bags contain 3 plaid gray bags, 4 drab coral bags. +dotted white bags contain 2 drab yellow bags, 5 dull olive bags. +wavy fuchsia bags contain 4 dull aqua bags. +bright orange bags contain 2 plaid blue bags, 2 posh blue bags, 3 light lime bags, 1 dim fuchsia bag. +shiny orange bags contain 2 drab yellow bags, 5 dim coral bags, 3 wavy blue bags. +dark purple bags contain 5 dim brown bags, 2 clear magenta bags. +wavy purple bags contain 1 dim maroon bag, 4 plaid cyan bags. +clear fuchsia bags contain 4 pale maroon bags. +dim olive bags contain 5 dim yellow bags, 1 wavy indigo bag, 4 dim aqua bags, 1 shiny gray bag. +bright beige bags contain 1 faded cyan bag. +dim lime bags contain 1 dull silver bag, 5 dark yellow bags, 3 dark crimson bags, 2 mirrored cyan bags. +drab silver bags contain 5 muted beige bags, 2 drab gold bags, 3 dotted magenta bags. +dotted chartreuse bags contain 3 dim gray bags. +clear crimson bags contain 3 wavy coral bags, 1 clear salmon bag, 1 light orange bag. +dark gold bags contain 2 dark tomato bags, 1 faded cyan bag. +posh silver bags contain 5 faded bronze bags, 1 plaid aqua bag, 1 plaid fuchsia bag, 5 wavy teal bags. +dark salmon bags contain 1 striped chartreuse bag, 1 faded cyan bag, 5 dotted coral bags. +drab lavender bags contain 2 plaid blue bags, 1 drab tomato bag, 5 clear brown bags. +light red bags contain 5 dull salmon bags, 2 shiny coral bags. +dim lavender bags contain 1 wavy beige bag, 2 wavy violet bags, 5 shiny green bags. +dim blue bags contain 2 vibrant orange bags, 3 dull olive bags. +muted red bags contain 5 shiny lime bags. +light gray bags contain 1 bright magenta bag, 2 wavy teal bags. +vibrant gold bags contain 5 dotted red bags, 5 light maroon bags, 1 striped blue bag. +pale white bags contain 3 muted brown bags. +dotted tan bags contain 1 faded salmon bag, 1 drab olive bag, 2 dim lime bags, 2 wavy chartreuse bags. +mirrored salmon bags contain 4 bright turquoise bags, 3 vibrant coral bags, 4 dull orange bags. +striped aqua bags contain 2 shiny crimson bags, 4 plaid beige bags. +dark crimson bags contain 4 bright fuchsia bags, 2 dark maroon bags, 5 dim maroon bags. +faded beige bags contain 3 posh white bags, 4 light turquoise bags. +clear yellow bags contain 1 vibrant lime bag, 1 dotted tomato bag, 4 pale black bags, 1 pale bronze bag. +bright coral bags contain 2 wavy crimson bags, 3 mirrored olive bags, 2 light tan bags, 5 faded cyan bags. +clear maroon bags contain 1 faded yellow bag, 4 dark chartreuse bags, 4 bright magenta bags. +shiny magenta bags contain 2 faded red bags. +bright gray bags contain 1 dim violet bag, 4 faded cyan bags, 5 light turquoise bags. +dotted red bags contain 1 plaid blue bag, 4 dark olive bags, 1 wavy plum bag. +mirrored coral bags contain 3 pale lime bags, 5 dim chartreuse bags, 3 vibrant violet bags. +drab maroon bags contain 1 drab lime bag, 2 drab tan bags. +dark tan bags contain 2 pale turquoise bags, 3 dotted brown bags. +pale yellow bags contain 5 faded cyan bags, 4 dotted blue bags. +dim crimson bags contain 2 dark silver bags, 5 plaid lavender bags, 5 pale gold bags. +faded lavender bags contain 2 clear aqua bags. +wavy indigo bags contain 2 striped crimson bags, 1 drab tomato bag, 1 light salmon bag. +wavy black bags contain 2 shiny gold bags. +plaid violet bags contain 2 pale crimson bags, 1 mirrored crimson bag. +clear turquoise bags contain 4 striped white bags. +striped orange bags contain 5 clear magenta bags. +pale teal bags contain 1 vibrant olive bag, 1 pale lime bag, 2 plaid teal bags. +clear indigo bags contain 2 shiny white bags, 3 shiny cyan bags. +dull tan bags contain 4 shiny orange bags, 4 posh coral bags, 1 dim purple bag. +dotted crimson bags contain 4 clear cyan bags, 4 posh coral bags, 1 clear lime bag. +striped plum bags contain 4 pale aqua bags, 3 clear yellow bags, 5 dotted orange bags, 4 clear crimson bags. +dull bronze bags contain 3 striped bronze bags. +dark maroon bags contain 3 wavy purple bags, 2 plaid cyan bags, 1 faded cyan bag. +striped gray bags contain 5 plaid gray bags, 4 vibrant cyan bags, 5 vibrant brown bags, 2 dull plum bags. +bright maroon bags contain 1 faded olive bag. +vibrant green bags contain 5 drab gold bags, 1 shiny chartreuse bag, 1 dark black bag. +mirrored orange bags contain 2 light brown bags, 1 drab tomato bag, 1 muted beige bag. +light magenta bags contain 3 muted maroon bags, 5 dotted gray bags, 2 vibrant tomato bags, 4 muted beige bags. +posh aqua bags contain 1 wavy bronze bag, 3 clear magenta bags. +pale aqua bags contain 2 faded cyan bags, 5 wavy teal bags, 5 plaid aqua bags. +dull teal bags contain 3 clear salmon bags. +dull violet bags contain 4 posh cyan bags. +drab bronze bags contain 3 clear lime bags, 2 drab maroon bags, 2 mirrored bronze bags. +light lime bags contain 3 light brown bags. +plaid tomato bags contain 3 dim cyan bags, 1 striped turquoise bag. +mirrored green bags contain 2 clear beige bags, 3 plaid teal bags, 3 pale lime bags, 2 plaid orange bags. +dark aqua bags contain 3 dark beige bags, 1 posh gray bag. +posh gold bags contain 5 bright silver bags. +pale gray bags contain 1 vibrant coral bag, 1 striped beige bag. +dim gray bags contain 3 shiny orange bags. +mirrored yellow bags contain 4 faded gold bags, 2 muted teal bags. +dull coral bags contain 4 light maroon bags, 5 bright brown bags, 2 faded orange bags, 1 light fuchsia bag. +mirrored white bags contain 1 vibrant silver bag, 3 muted coral bags, 5 muted green bags, 1 pale aqua bag. +striped gold bags contain 4 dim white bags. +clear orange bags contain 3 vibrant violet bags, 4 muted fuchsia bags, 5 plaid orange bags, 1 faded salmon bag. +drab purple bags contain 5 dotted tomato bags. +muted lime bags contain 4 drab magenta bags, 1 vibrant coral bag. +dotted green bags contain 4 light tan bags, 4 wavy bronze bags, 5 wavy indigo bags. +posh olive bags contain 3 light maroon bags. +dull cyan bags contain 3 vibrant tan bags, 1 muted fuchsia bag. +bright bronze bags contain 3 shiny turquoise bags, 5 dull turquoise bags. +dull brown bags contain 5 dull indigo bags, 5 pale salmon bags, 1 shiny gray bag. +posh cyan bags contain 5 striped green bags, 5 dull aqua bags, 1 shiny silver bag. +wavy red bags contain 2 posh white bags, 2 dark salmon bags, 4 dark lime bags, 5 vibrant brown bags. +faded gold bags contain 3 striped green bags, 4 dull olive bags, 4 drab yellow bags, 5 faded cyan bags. +wavy salmon bags contain 1 striped silver bag. +mirrored bronze bags contain 4 dull aqua bags, 2 clear tan bags. +striped crimson bags contain no other bags. +striped violet bags contain 2 muted brown bags, 5 bright brown bags, 4 dotted chartreuse bags. +dim aqua bags contain 5 striped blue bags, 2 light tan bags. +faded violet bags contain 5 pale plum bags, 5 posh green bags. +wavy brown bags contain 1 dim coral bag, 3 muted beige bags, 1 shiny orange bag, 1 dim brown bag. +muted green bags contain 5 dim teal bags, 1 pale tomato bag. +wavy lavender bags contain 2 clear brown bags, 3 mirrored indigo bags. +drab turquoise bags contain 3 vibrant indigo bags. +clear blue bags contain 2 striped beige bags, 2 dark maroon bags, 1 shiny beige bag. +drab fuchsia bags contain 5 striped lime bags, 5 drab beige bags, 1 dotted red bag, 5 clear cyan bags. +bright violet bags contain 2 striped chartreuse bags, 1 bright fuchsia bag, 1 wavy teal bag. +muted blue bags contain 4 bright violet bags. +dotted lime bags contain 1 dim silver bag, 4 striped maroon bags. +dull aqua bags contain 1 drab lavender bag. +clear teal bags contain 5 drab plum bags, 4 pale brown bags, 4 faded fuchsia bags. +dim gold bags contain 3 bright violet bags, 3 dim fuchsia bags. +pale indigo bags contain 4 dim lime bags, 4 dim red bags. +plaid aqua bags contain 5 drab tomato bags, 1 wavy teal bag, 2 shiny silver bags, 5 clear brown bags. +bright olive bags contain 1 vibrant brown bag, 5 dull violet bags. +striped lime bags contain 5 dim beige bags, 4 wavy chartreuse bags, 1 shiny orange bag, 3 bright violet bags. +mirrored silver bags contain 3 faded olive bags, 5 shiny tomato bags. +light green bags contain 4 mirrored turquoise bags, 3 bright tan bags, 5 clear lavender bags. +clear chartreuse bags contain 3 vibrant lime bags. +clear coral bags contain 5 faded turquoise bags, 3 dim tan bags, 5 light lime bags. +muted cyan bags contain 3 striped green bags, 1 wavy green bag, 3 dull cyan bags, 5 striped black bags. +faded brown bags contain 5 clear olive bags, 5 bright turquoise bags, 4 vibrant violet bags, 4 dotted violet bags. +faded tomato bags contain 1 posh fuchsia bag. +muted gold bags contain 1 pale cyan bag, 2 pale tomato bags, 3 dotted beige bags. +plaid brown bags contain 3 dim fuchsia bags, 3 dark chartreuse bags, 4 bright magenta bags. +posh maroon bags contain 5 striped purple bags, 2 dim gold bags, 5 dull silver bags. +shiny black bags contain 2 dim silver bags. +posh crimson bags contain 2 posh plum bags, 5 faded coral bags, 4 drab salmon bags. +shiny crimson bags contain 1 drab gold bag, 1 light turquoise bag, 4 pale gray bags, 2 pale lime bags. +wavy yellow bags contain 2 mirrored coral bags, 5 muted fuchsia bags. +bright green bags contain 1 bright brown bag, 4 muted turquoise bags, 2 muted gold bags, 5 clear green bags. +mirrored crimson bags contain 3 drab indigo bags, 2 wavy blue bags, 2 striped orange bags, 4 drab lavender bags. +bright purple bags contain 3 bright black bags, 2 dull fuchsia bags, 4 bright plum bags. +shiny purple bags contain 5 striped chartreuse bags, 2 bright fuchsia bags, 5 drab lavender bags, 1 pale black bag. +muted teal bags contain 1 shiny brown bag, 5 wavy fuchsia bags. +drab violet bags contain 4 bright violet bags, 1 clear beige bag, 3 vibrant tomato bags, 1 light olive bag. +vibrant beige bags contain 2 light brown bags. +wavy teal bags contain 3 striped crimson bags. +wavy gray bags contain 1 vibrant coral bag. +dim magenta bags contain 2 vibrant crimson bags, 5 dim lavender bags, 1 mirrored black bag. +dim plum bags contain 3 striped magenta bags, 4 light teal bags, 4 dark salmon bags, 5 drab orange bags. +light tan bags contain 3 clear brown bags, 4 bright violet bags. +light bronze bags contain 1 shiny gold bag, 1 striped bronze bag. +faded aqua bags contain 4 vibrant silver bags. +wavy chartreuse bags contain 1 shiny purple bag. +dark plum bags contain 1 dotted gold bag, 1 mirrored yellow bag, 4 light indigo bags. +striped black bags contain 1 posh yellow bag, 5 light salmon bags, 4 plaid tan bags. +mirrored fuchsia bags contain 2 plaid cyan bags, 3 mirrored cyan bags. +dull white bags contain 2 clear silver bags, 5 light red bags, 2 pale lime bags. +pale brown bags contain 5 shiny tan bags, 3 drab aqua bags, 3 dark yellow bags. +mirrored maroon bags contain 4 dark beige bags, 4 plaid salmon bags, 3 striped purple bags. +light violet bags contain 3 faded salmon bags, 3 posh salmon bags. +pale blue bags contain 5 striped silver bags, 2 shiny violet bags. +plaid beige bags contain 1 dotted green bag, 1 faded yellow bag, 5 dull lavender bags. +drab tan bags contain 3 striped magenta bags, 5 dim beige bags, 1 bright turquoise bag, 2 faded gold bags. +pale violet bags contain 4 dull plum bags, 5 pale red bags, 1 dotted silver bag, 4 striped coral bags. +light tomato bags contain 2 wavy chartreuse bags, 4 bright beige bags, 5 muted cyan bags. +shiny turquoise bags contain 3 drab fuchsia bags, 2 dull turquoise bags, 4 vibrant plum bags. +muted salmon bags contain 5 pale black bags, 3 muted green bags, 4 vibrant magenta bags. +dotted maroon bags contain 2 dotted turquoise bags, 1 dull silver bag, 5 mirrored yellow bags, 1 mirrored lavender bag. +dull lime bags contain 3 wavy teal bags. +plaid magenta bags contain 5 posh maroon bags. +vibrant teal bags contain 5 striped purple bags, 1 wavy chartreuse bag, 1 shiny chartreuse bag, 5 clear plum bags. +striped turquoise bags contain 2 clear chartreuse bags, 5 dim fuchsia bags, 4 dotted tomato bags, 1 wavy brown bag. +clear brown bags contain no other bags. +mirrored beige bags contain 2 posh fuchsia bags. +light maroon bags contain 4 plaid blue bags, 4 drab purple bags, 5 pale aqua bags. +light silver bags contain 2 posh turquoise bags, 2 pale tomato bags, 3 plaid red bags. +bright magenta bags contain 4 shiny violet bags, 5 shiny silver bags. +muted magenta bags contain 2 light brown bags, 4 vibrant plum bags, 3 mirrored black bags. +shiny olive bags contain 2 posh magenta bags. +vibrant lavender bags contain 2 shiny violet bags, 4 mirrored white bags, 5 dull lavender bags, 2 wavy olive bags. +faded turquoise bags contain 2 drab crimson bags, 5 dim crimson bags, 5 dark indigo bags, 5 dotted silver bags. +faded olive bags contain 5 striped tan bags. +dark yellow bags contain 1 dotted coral bag, 1 plaid fuchsia bag. +dim violet bags contain 3 dotted coral bags. +dark red bags contain 2 posh silver bags. +wavy white bags contain 4 striped tan bags. +mirrored cyan bags contain 2 plaid cyan bags, 5 wavy chartreuse bags, 1 striped orange bag. +shiny maroon bags contain 3 dark violet bags, 4 wavy plum bags, 1 plaid aqua bag, 4 light turquoise bags. +vibrant black bags contain 3 plaid yellow bags, 3 plaid tan bags, 1 posh cyan bag. +posh plum bags contain 1 vibrant brown bag, 5 pale violet bags. +bright salmon bags contain 1 posh tan bag, 4 pale black bags. +shiny red bags contain 1 wavy magenta bag, 3 clear gray bags. +dark violet bags contain no other bags. +mirrored tomato bags contain 3 wavy fuchsia bags. +drab coral bags contain 3 light brown bags, 4 striped crimson bags. +striped chartreuse bags contain 4 striped green bags. +drab magenta bags contain 2 faded cyan bags, 5 bright cyan bags. +drab white bags contain 3 vibrant violet bags, 1 posh coral bag. +light chartreuse bags contain 5 drab lime bags, 3 dull salmon bags, 5 clear plum bags, 2 dull beige bags. +pale olive bags contain 5 faded silver bags, 4 dotted aqua bags, 1 dark purple bag, 5 drab beige bags. +wavy tomato bags contain 2 dim bronze bags, 3 posh white bags, 3 dark salmon bags. +shiny blue bags contain 1 clear bronze bag. +shiny gray bags contain 1 dotted white bag, 1 mirrored indigo bag. +muted tan bags contain 1 clear maroon bag, 1 clear blue bag. +posh coral bags contain 2 shiny brown bags. +drab teal bags contain 1 dotted red bag, 3 pale cyan bags, 4 muted yellow bags, 2 dim beige bags. +dull orange bags contain 1 bright silver bag. +vibrant red bags contain 2 light turquoise bags, 4 dark green bags, 4 dull plum bags, 3 striped plum bags. +bright silver bags contain 2 light purple bags, 5 muted green bags. +vibrant yellow bags contain 1 dotted gold bag. +plaid chartreuse bags contain 5 muted green bags, 3 dim maroon bags, 4 drab black bags, 5 mirrored turquoise bags. +dull salmon bags contain 1 wavy bronze bag. +dim teal bags contain 2 vibrant magenta bags, 2 dull aqua bags, 2 dark crimson bags. +striped coral bags contain 4 light salmon bags. +dark teal bags contain 2 clear yellow bags, 2 mirrored coral bags, 5 mirrored yellow bags. +dark indigo bags contain 1 clear gray bag, 5 wavy violet bags. +bright indigo bags contain 5 light maroon bags, 1 muted magenta bag, 3 vibrant lime bags. +drab plum bags contain 5 wavy coral bags, 1 wavy aqua bag, 5 dim tan bags. +drab beige bags contain 4 wavy teal bags, 4 dotted orange bags, 4 dotted coral bags. +dull yellow bags contain 3 wavy tan bags, 2 plaid green bags, 3 bright magenta bags, 1 vibrant beige bag. +muted olive bags contain 2 faded black bags, 2 bright fuchsia bags. +drab chartreuse bags contain 3 clear bronze bags, 3 plaid brown bags, 4 light magenta bags, 2 clear salmon bags. +clear violet bags contain 5 plaid beige bags, 3 striped white bags, 5 light teal bags, 3 dotted silver bags. +posh lime bags contain 1 faded plum bag, 4 mirrored white bags, 4 posh aqua bags. +faded red bags contain 5 bright fuchsia bags, 4 faded cyan bags, 4 dark violet bags. +muted maroon bags contain 1 vibrant lime bag, 3 dim fuchsia bags, 1 drab lavender bag, 3 light blue bags. +drab red bags contain 1 pale orange bag, 3 dim teal bags, 2 wavy orange bags, 5 dark salmon bags. +dim silver bags contain 4 dim lime bags, 5 drab maroon bags, 2 vibrant coral bags, 1 vibrant white bag. +light aqua bags contain 5 light fuchsia bags. +light cyan bags contain 3 muted fuchsia bags. +dull black bags contain 2 pale lavender bags. +mirrored turquoise bags contain 4 dull lime bags, 4 dull silver bags. +pale coral bags contain 2 shiny silver bags, 1 dull turquoise bag, 2 shiny purple bags. +dull beige bags contain 2 mirrored teal bags, 3 dotted white bags, 5 posh blue bags. +muted yellow bags contain 2 dim maroon bags. +dim white bags contain 2 pale crimson bags, 4 clear brown bags, 2 mirrored coral bags. +faded yellow bags contain 2 light turquoise bags. +dim cyan bags contain 4 mirrored yellow bags, 1 clear blue bag, 4 striped maroon bags. +posh purple bags contain 2 drab crimson bags, 5 shiny violet bags, 5 drab cyan bags, 5 dark tomato bags. +drab crimson bags contain 5 plaid tan bags. +posh teal bags contain 5 light olive bags, 5 mirrored teal bags, 3 bright white bags, 5 mirrored white bags. +dark orange bags contain 5 mirrored lavender bags, 2 posh purple bags, 4 wavy magenta bags, 5 plaid cyan bags. +dotted beige bags contain 3 bright brown bags, 1 pale orange bag, 3 light orange bags, 2 clear beige bags. +bright gold bags contain 4 pale gray bags, 5 muted maroon bags, 3 drab tan bags, 5 mirrored turquoise bags. +faded fuchsia bags contain 3 shiny red bags, 5 faded violet bags. +dotted black bags contain 4 muted teal bags, 5 faded violet bags, 5 mirrored coral bags. +muted plum bags contain 4 plaid gray bags. +faded orange bags contain 4 wavy bronze bags, 2 light crimson bags, 3 mirrored bronze bags, 5 striped maroon bags. +plaid gold bags contain 5 pale crimson bags, 4 clear tan bags, 3 wavy turquoise bags, 2 dim chartreuse bags. +mirrored violet bags contain 4 dim brown bags. +pale cyan bags contain 3 dotted aqua bags, 5 dim fuchsia bags, 1 dim violet bag, 1 clear yellow bag. +dull magenta bags contain 3 light chartreuse bags, 4 light aqua bags, 3 faded indigo bags, 4 clear blue bags. +light teal bags contain 1 shiny cyan bag. +dark beige bags contain 3 dull tan bags, 3 shiny aqua bags, 3 drab black bags, 1 faded cyan bag. +light yellow bags contain 1 dim beige bag, 1 wavy cyan bag, 1 dim coral bag. +bright aqua bags contain 2 drab beige bags, 3 dotted aqua bags, 5 drab olive bags. +shiny teal bags contain 5 vibrant tan bags, 1 posh blue bag, 5 dotted gray bags. +mirrored blue bags contain 1 dim beige bag. +clear magenta bags contain 4 clear tan bags, 5 plaid orange bags, 3 bright violet bags, 3 light lime bags. +pale green bags contain 2 vibrant white bags. +light fuchsia bags contain 4 wavy plum bags, 5 dull olive bags, 5 striped orange bags. +bright lime bags contain 1 dark yellow bag. +dull tomato bags contain 3 wavy blue bags, 1 drab aqua bag. +faded indigo bags contain 5 posh gold bags, 4 shiny beige bags, 4 wavy gray bags, 5 dim magenta bags. +wavy coral bags contain 4 dark olive bags, 5 dull silver bags, 1 clear magenta bag, 1 light crimson bag. +shiny plum bags contain 4 shiny tan bags, 3 vibrant white bags, 1 striped gold bag. +clear aqua bags contain 1 light crimson bag, 4 bright silver bags, 2 wavy gold bags, 3 mirrored indigo bags. +plaid blue bags contain no other bags. +dark lime bags contain 3 dim chartreuse bags, 5 plaid indigo bags, 1 dim brown bag. +clear plum bags contain 5 light salmon bags, 4 drab lavender bags. +plaid cyan bags contain no other bags. +clear white bags contain 2 vibrant tomato bags. +faded tan bags contain 1 dull yellow bag, 2 shiny indigo bags. +plaid coral bags contain 1 dull bronze bag, 2 clear tan bags, 3 clear maroon bags. +pale bronze bags contain 4 wavy cyan bags, 3 pale aqua bags, 3 dark maroon bags, 5 dim fuchsia bags. +posh green bags contain 4 clear plum bags, 1 pale cyan bag, 3 striped maroon bags. +dim indigo bags contain 4 vibrant green bags, 3 dark teal bags, 2 dim violet bags, 4 shiny aqua bags. +muted violet bags contain 3 wavy tan bags. +muted tomato bags contain 3 drab yellow bags, 2 muted green bags. +posh white bags contain 3 striped chartreuse bags, 4 wavy blue bags. +drab brown bags contain 1 wavy fuchsia bag, 3 wavy lime bags. +dim purple bags contain 5 wavy gray bags, 3 shiny cyan bags. +vibrant brown bags contain 4 shiny orange bags, 2 mirrored bronze bags, 1 clear salmon bag, 4 shiny silver bags. +light purple bags contain 2 light brown bags. +mirrored teal bags contain 5 bright brown bags, 2 drab aqua bags. +dark cyan bags contain 4 wavy lime bags. +clear bronze bags contain 5 clear green bags, 4 dull black bags, 5 muted salmon bags. +posh tan bags contain 4 dim orange bags. +vibrant magenta bags contain 2 clear magenta bags, 5 drab purple bags, 2 bright fuchsia bags. +bright tomato bags contain 4 pale bronze bags. +faded green bags contain 2 vibrant indigo bags, 4 plaid indigo bags, 5 drab red bags, 5 clear turquoise bags. +wavy olive bags contain 4 mirrored crimson bags, 4 dotted green bags, 4 drab lime bags, 5 posh brown bags. +dark brown bags contain 2 mirrored olive bags, 2 striped blue bags. +muted orange bags contain 1 dark gray bag, 3 posh silver bags, 1 dim lavender bag. +shiny beige bags contain 1 dark silver bag, 5 dotted violet bags. +mirrored olive bags contain 1 dull violet bag. +shiny aqua bags contain 3 light fuchsia bags, 3 plaid gray bags, 4 dull orange bags. +mirrored brown bags contain 4 faded olive bags, 2 plaid aqua bags, 2 posh cyan bags, 4 pale purple bags. +muted bronze bags contain 5 vibrant lime bags, 5 light crimson bags, 5 wavy tan bags. +striped maroon bags contain 4 dark salmon bags, 1 posh white bag, 4 shiny green bags, 3 drab lavender bags. +vibrant purple bags contain 2 posh gray bags, 3 dark chartreuse bags, 3 wavy bronze bags, 5 faded purple bags. +dark turquoise bags contain 4 vibrant bronze bags, 4 pale tomato bags, 4 vibrant teal bags. +drab orange bags contain 2 shiny teal bags, 2 light olive bags, 2 dim coral bags. +shiny gold bags contain 2 mirrored orange bags, 2 dotted coral bags, 3 dim fuchsia bags. +wavy orange bags contain 4 clear beige bags, 4 faded gold bags. +bright brown bags contain 4 shiny green bags, 1 mirrored bronze bag, 4 dull silver bags, 3 drab purple bags. +posh turquoise bags contain 2 mirrored turquoise bags, 3 dotted tomato bags, 2 mirrored fuchsia bags, 5 pale tomato bags. +faded black bags contain 3 light lime bags. +muted chartreuse bags contain 4 shiny green bags. +striped cyan bags contain 5 mirrored olive bags, 4 dark silver bags. +vibrant turquoise bags contain 3 shiny teal bags. +wavy crimson bags contain 1 posh lime bag. +dull green bags contain 4 dull gray bags, 5 shiny lime bags. +wavy tan bags contain 4 dull olive bags, 3 faded cyan bags, 1 dim maroon bag, 4 striped crimson bags. +vibrant coral bags contain 5 mirrored lavender bags. +light coral bags contain 5 clear yellow bags, 1 faded violet bag, 3 drab yellow bags. +striped blue bags contain 5 striped crimson bags, 1 drab purple bag, 2 dotted coral bags. +vibrant fuchsia bags contain 3 striped blue bags. +drab gold bags contain 4 dark chartreuse bags, 2 clear orange bags, 5 vibrant magenta bags, 1 wavy gray bag. +dim beige bags contain 4 drab yellow bags, 3 clear tan bags, 2 drab lavender bags, 1 striped green bag. +mirrored chartreuse bags contain 5 posh gold bags, 2 posh violet bags. +vibrant maroon bags contain 2 faded brown bags, 3 light red bags. +dim bronze bags contain 3 pale tomato bags, 4 shiny green bags, 4 posh orange bags. +clear purple bags contain 1 wavy purple bag, 1 plaid aqua bag, 4 drab cyan bags. +dull chartreuse bags contain 5 drab beige bags. +bright lavender bags contain 3 plaid green bags, 1 wavy indigo bag, 4 vibrant brown bags, 4 mirrored black bags. +muted crimson bags contain 4 dotted gray bags. +shiny brown bags contain 2 pale black bags, 5 dark olive bags. +posh orange bags contain 2 pale coral bags. +mirrored lavender bags contain 1 drab yellow bag, 5 mirrored bronze bags. +vibrant aqua bags contain 3 dim brown bags. +pale beige bags contain 5 drab plum bags, 4 clear tan bags, 2 light silver bags. +vibrant tomato bags contain 4 faded gold bags, 4 dim brown bags, 3 wavy cyan bags. +drab black bags contain 1 shiny tan bag, 2 wavy orange bags, 3 wavy plum bags, 5 posh silver bags. +faded blue bags contain 2 clear chartreuse bags, 3 bright turquoise bags, 1 clear lime bag. +clear black bags contain 4 pale magenta bags, 1 faded orange bag, 2 plaid salmon bags, 1 bright yellow bag. +dim maroon bags contain no other bags. +dotted olive bags contain 5 plaid indigo bags. +dotted silver bags contain 4 posh maroon bags, 1 vibrant brown bag, 4 mirrored olive bags. +plaid lavender bags contain 4 dull lime bags, 2 wavy coral bags, 5 dim silver bags, 4 dim fuchsia bags. +striped salmon bags contain 3 posh bronze bags, 1 bright aqua bag, 1 wavy white bag. +vibrant crimson bags contain 2 vibrant lime bags, 3 striped black bags, 2 dull plum bags. +plaid silver bags contain 4 clear crimson bags, 3 wavy white bags, 4 pale coral bags, 1 wavy brown bag. +clear tan bags contain 4 clear brown bags, 4 dim maroon bags, 1 wavy purple bag. +striped yellow bags contain 4 posh turquoise bags, 5 wavy yellow bags, 1 muted bronze bag. +clear lavender bags contain 1 striped lime bag, 4 dim chartreuse bags, 2 dim tan bags. +shiny white bags contain 4 bright brown bags, 1 dull indigo bag. +drab blue bags contain 2 bright gold bags, 3 faded beige bags, 3 dark lime bags. +posh violet bags contain 4 clear brown bags. +light gold bags contain 2 shiny purple bags, 4 mirrored bronze bags. +dull turquoise bags contain 5 dull silver bags. +vibrant cyan bags contain 1 wavy lavender bag. +dotted violet bags contain 5 vibrant violet bags, 5 vibrant blue bags, 1 dim violet bag, 5 wavy cyan bags. +drab olive bags contain 4 dotted aqua bags. +wavy beige bags contain 3 mirrored lavender bags, 2 posh white bags, 3 bright fuchsia bags. +bright blue bags contain 1 drab indigo bag. +wavy gold bags contain 2 shiny orange bags. +striped fuchsia bags contain 1 striped chartreuse bag. +posh red bags contain 4 vibrant tomato bags, 1 dark maroon bag. +faded plum bags contain 2 drab indigo bags, 3 bright turquoise bags. +dull plum bags contain 5 vibrant magenta bags. +dotted gold bags contain 4 striped maroon bags. +dotted brown bags contain 1 vibrant brown bag, 2 vibrant crimson bags, 2 striped purple bags, 5 striped olive bags. +pale lavender bags contain 5 wavy fuchsia bags, 5 wavy lavender bags. diff --git a/Day 7/one.py b/Day 7/one.py new file mode 100755 index 0000000..42c06bb --- /dev/null +++ b/Day 7/one.py @@ -0,0 +1,42 @@ +#!/bin/python + +def check(bag, rules): + if "shiny gold" in rules[bag]: + return True + + result = False + for possible_bag in rules[bag]: + result = result or check (possible_bag, rules) + + return result + +# $color bags contain {$number $color bags,}*x + +# color: {colors} +rules = {} + +with open("input", 'r') as input: + for line in input: + line = line.strip() + parts = line.split(" bags contain ") + key = parts[0] + value = [] + + parts = parts[1].strip(".").split(", ") + + for part in parts: + if part == "no other bags": + break; + value.append(part.split(" ", 1)[1].replace("bags", "").replace("bag", "").strip()) + + rules[key] = value + + + total = 0 + for key in rules: + print(f"Now checking: {key}") + if check(key, rules): + total += 1 + + print(total) + diff --git a/Day 7/two.py b/Day 7/two.py new file mode 100755 index 0000000..563f28f --- /dev/null +++ b/Day 7/two.py @@ -0,0 +1,45 @@ +#!/bin/python + + # faded blue bags contain 0 other bags. + # dotted black bags contain 0 other bags. + # vibrant plum bags contain 11 other bags: 5 faded blue bags and 6 dotted black bags. + # dark olive bags contain 7 other bags: 3 faded blue bags and 4 dotted black bags. + # shiny gold bags contain 3 other bags: 1 dark olive bag and 2 vibrant plume bags + + # 7 + 2*11 + +def check(bag, rules): + result = 0 + for needed_bag, amount in rules[bag].items(): + if rules[needed_bag] == {}: + result += amount + else: + result += amount + amount * check(needed_bag, rules) + + return result + +# $color bags contain {$number $color bags,}*x + +# color: {colors} + +with open("input", 'r') as input: + rules = {} + for line in input: + line = line.strip() + parts = line.split(" bags contain ") + key = parts[0] + value = {} + + parts = parts[1].strip(".").split(", ") + + for part in parts: + if part == "no other bags": + break; + bag_parts = part.split(" ", 1) + value[bag_parts[1].replace("bags", "").replace("bag", "").strip()] = int(bag_parts[0]) + + rules[key] = value + + + print(check("shiny gold", rules)) + diff --git a/Day 8/input b/Day 8/input new file mode 100644 index 0000000..0adb4af --- /dev/null +++ b/Day 8/input @@ -0,0 +1,654 @@ +acc +50 +acc -11 +nop +378 +acc +15 +jmp +508 +acc -3 +jmp +1 +jmp +135 +jmp +1 +acc -6 +acc +14 +acc +32 +jmp +315 +acc -16 +jmp +249 +jmp +283 +acc -14 +acc +5 +acc +29 +jmp +366 +acc +22 +jmp +77 +acc +19 +jmp +496 +acc -2 +acc -16 +nop +284 +nop +36 +jmp +178 +jmp +281 +acc +32 +acc +45 +acc +16 +jmp +403 +nop +86 +nop +32 +acc +10 +jmp +47 +acc -13 +acc +35 +jmp +270 +jmp +1 +acc +34 +acc -3 +nop +116 +jmp +552 +acc +27 +nop +113 +jmp +495 +acc -18 +acc +47 +acc +19 +jmp +180 +acc -8 +acc -1 +acc -14 +acc +17 +jmp +431 +acc +49 +acc +22 +acc +39 +acc +28 +jmp +74 +jmp -10 +acc -5 +acc +35 +jmp +251 +acc +31 +acc -11 +jmp -49 +acc -12 +acc +49 +jmp +36 +acc -19 +acc -9 +acc +11 +acc -1 +jmp +419 +jmp +307 +acc +36 +jmp +563 +acc +32 +acc +1 +jmp +270 +acc +17 +jmp +464 +jmp +133 +acc +29 +acc +31 +jmp +394 +acc -2 +jmp +94 +acc +44 +acc +28 +acc +32 +jmp +543 +acc +18 +jmp +325 +acc +16 +acc +42 +jmp +315 +acc -6 +jmp +371 +acc +41 +acc +29 +jmp +44 +acc -19 +jmp +393 +acc +4 +jmp +81 +acc +25 +jmp +108 +acc -18 +jmp +1 +jmp +1 +acc +34 +jmp +124 +acc +25 +acc +45 +jmp -46 +acc -11 +acc +43 +acc +50 +jmp +6 +acc +3 +acc -6 +acc +38 +acc +9 +jmp +402 +acc +26 +nop +97 +acc +26 +jmp +115 +acc -1 +acc +2 +jmp +7 +acc +38 +nop +5 +jmp -75 +acc +41 +nop +470 +jmp +15 +acc -15 +acc +19 +acc +22 +jmp +240 +acc +14 +acc +26 +jmp +71 +acc +38 +acc +25 +jmp +349 +acc +25 +acc +31 +acc +41 +jmp +419 +jmp -69 +acc +50 +nop +218 +jmp -106 +nop +225 +jmp +307 +acc +33 +acc -4 +acc +36 +jmp -57 +acc +14 +acc +0 +acc -2 +jmp +184 +acc +47 +nop +161 +acc -4 +jmp -149 +jmp +103 +acc +39 +acc +25 +acc +8 +acc +2 +jmp +364 +acc +48 +jmp +241 +nop +432 +acc +9 +jmp +304 +acc +20 +jmp +223 +acc +12 +acc +21 +jmp +121 +acc +12 +acc +47 +acc +50 +acc +8 +jmp +283 +jmp +1 +jmp +81 +acc +22 +acc -6 +jmp +1 +acc -9 +jmp +340 +acc -9 +acc +5 +acc +11 +jmp +204 +acc -13 +acc +12 +jmp +322 +acc +38 +acc +50 +nop +211 +jmp +91 +acc +31 +acc +34 +jmp -95 +acc +12 +acc +13 +jmp -172 +nop +419 +jmp +1 +nop -191 +acc +48 +jmp +157 +acc +22 +acc +27 +jmp +61 +acc +23 +nop +181 +jmp -121 +nop +367 +jmp -168 +jmp +1 +nop -218 +jmp -142 +jmp +295 +jmp +112 +acc +9 +acc -12 +jmp +114 +acc +50 +jmp -28 +acc +18 +nop -223 +acc +37 +acc -14 +jmp +169 +acc +0 +acc +42 +jmp +115 +acc +2 +acc +31 +jmp -189 +acc +7 +acc +45 +acc -2 +acc +34 +jmp -121 +acc -13 +acc +4 +nop -94 +acc +34 +jmp +123 +acc -11 +acc -13 +jmp -29 +acc -11 +nop -169 +acc -11 +nop +369 +jmp +189 +acc -4 +jmp +20 +nop +19 +acc -13 +nop +368 +jmp -79 +acc -19 +acc +23 +acc -7 +acc -11 +jmp +36 +acc -18 +acc +31 +nop +349 +acc +11 +jmp -106 +acc +43 +jmp +185 +acc +20 +nop +297 +jmp +138 +acc +8 +acc +26 +acc -2 +jmp -18 +nop -276 +jmp +44 +jmp +1 +acc +39 +jmp +314 +acc +0 +jmp -194 +acc +32 +acc +17 +acc +43 +jmp -298 +acc +28 +acc -10 +jmp -103 +acc -17 +acc +3 +jmp +25 +acc +35 +acc +7 +acc -2 +jmp -39 +acc +19 +acc +19 +acc -8 +jmp -282 +jmp -275 +acc -7 +jmp +196 +acc +14 +acc +5 +jmp +6 +acc -7 +jmp +29 +nop +275 +acc -12 +jmp +165 +acc +21 +acc +4 +jmp +95 +acc +15 +jmp -283 +jmp +199 +acc -9 +acc +0 +jmp -220 +acc +28 +acc +1 +jmp -313 +acc +13 +acc -5 +acc +38 +jmp +62 +acc +43 +jmp -159 +acc -14 +acc +44 +jmp -314 +acc +3 +acc +34 +jmp +47 +jmp -171 +acc +27 +acc +11 +acc +16 +jmp +16 +acc +27 +acc +40 +jmp +66 +acc +30 +acc -15 +jmp +177 +acc +36 +acc +41 +jmp -189 +acc -19 +jmp +106 +nop +271 +nop -176 +acc +13 +jmp +40 +nop +33 +jmp -324 +acc +18 +jmp -76 +acc +38 +acc +39 +acc +34 +jmp +231 +jmp -131 +acc +46 +acc +38 +acc -3 +jmp -161 +acc +31 +acc +10 +jmp +158 +acc -18 +acc +46 +jmp -291 +jmp +48 +acc +18 +acc +36 +acc +16 +jmp -77 +acc +9 +jmp -289 +acc +38 +jmp -388 +nop +137 +acc +42 +acc +17 +nop -37 +jmp -145 +jmp -336 +acc +46 +acc -18 +acc -13 +acc +21 +jmp -97 +acc +49 +nop -189 +acc +21 +jmp -186 +acc +25 +acc +37 +jmp +193 +jmp +1 +acc -14 +acc +4 +jmp +87 +acc +3 +nop -95 +jmp -243 +acc +30 +acc +35 +jmp -128 +jmp +1 +nop +55 +acc +48 +jmp +129 +jmp +1 +acc +37 +jmp -326 +acc -2 +acc -13 +acc +37 +jmp -72 +acc +23 +jmp +130 +acc +18 +acc +0 +acc +36 +jmp -345 +acc +0 +acc +23 +acc +10 +jmp +1 +jmp -112 +nop -430 +acc +8 +acc +42 +jmp +1 +jmp +180 +nop -16 +acc +22 +jmp +1 +acc +2 +jmp +43 +acc +29 +acc +23 +acc -2 +jmp -364 +acc +14 +jmp -250 +acc -11 +nop -359 +jmp +132 +jmp -24 +nop +90 +acc +32 +jmp -461 +jmp -311 +acc +11 +acc +21 +jmp -320 +jmp -194 +jmp -165 +acc +43 +acc +5 +acc +12 +jmp -419 +jmp -467 +acc +47 +acc +35 +jmp +133 +acc +10 +nop -394 +acc +35 +nop -109 +jmp -298 +acc -10 +nop -451 +jmp -445 +jmp +57 +acc +31 +nop -1 +jmp -59 +acc +19 +acc +7 +jmp -5 +acc +31 +acc +0 +acc +29 +acc -8 +jmp -118 +jmp -119 +acc +35 +jmp -339 +acc +14 +nop +28 +acc +0 +acc +25 +jmp -265 +acc -9 +acc +29 +jmp -365 +nop +19 +acc +31 +acc +16 +jmp -116 +jmp -442 +acc +24 +acc -3 +jmp -505 +acc -5 +jmp -485 +acc -12 +acc +15 +jmp +1 +jmp -16 +acc +23 +nop -135 +jmp +26 +acc -16 +jmp -374 +jmp -171 +jmp -518 +acc +23 +acc +23 +jmp -282 +nop -78 +nop -230 +jmp -285 +acc +39 +acc +31 +jmp -219 +acc -18 +jmp +1 +acc +43 +jmp -175 +acc +46 +nop -391 +jmp -305 +acc -11 +acc +41 +acc +33 +acc -9 +jmp +70 +nop -8 +acc -3 +acc -16 +acc +8 +jmp -139 +nop -237 +acc +1 +nop -405 +acc +16 +jmp +14 +acc +0 +acc +35 +acc +26 +acc +43 +jmp +71 +nop -187 +nop -188 +jmp -7 +acc +34 +acc +11 +nop -35 +jmp -104 +jmp -37 +jmp +1 +acc +37 +acc +1 +nop -78 +jmp +19 +acc +35 +acc +35 +acc -3 +acc +0 +jmp -377 +acc +49 +jmp -519 +acc -18 +acc -5 +acc -15 +nop -76 +jmp -530 +acc +7 +acc +0 +jmp -19 +acc +15 +acc +37 +jmp -79 +jmp -339 +nop -398 +acc -16 +jmp +20 +acc -15 +acc -5 +acc +20 +acc -12 +jmp -21 +acc +39 +acc +32 +acc +34 +jmp -330 +acc +48 +acc +2 +acc -8 +acc -15 +jmp -231 +acc +35 +acc -16 +acc +26 +nop -547 +jmp -548 +acc +6 +acc +20 +acc +1 +jmp -439 +jmp -310 +acc +7 +acc +18 +jmp -58 +nop -444 +jmp -423 +acc -5 +jmp -40 +acc -14 +acc -11 +nop -283 +jmp -122 +acc +13 +acc +5 +nop -259 +acc +12 +jmp +1 diff --git a/Day 8/one.py b/Day 8/one.py new file mode 100755 index 0000000..b049fdc --- /dev/null +++ b/Day 8/one.py @@ -0,0 +1,22 @@ +#!/bin/python + +with open("input", 'r') as input: + code = [line.strip() for line in input.readlines()] + visited = [False for _ in range(len(code) + 1)] + acc = 0 + pointer = 0; + + while not visited[pointer]: + instr = code[pointer].split(" ") + + visited[pointer] = True + + if instr[0] == "acc": + acc += int(instr[1]) + pointer += 1 + elif instr[0] == "nop": + pointer += 1 + elif instr[0] == "jmp": + pointer += int(instr[1]) + + print(acc) diff --git a/Day 8/two.py b/Day 8/two.py new file mode 100755 index 0000000..88dbc92 --- /dev/null +++ b/Day 8/two.py @@ -0,0 +1,73 @@ +#!/bin/python + +def check(code): + visited = [False for _ in range(len(code) + 1)] + acc = 0 + pointer = 0; + + while not visited[pointer]: + instr = code[pointer].split(" ") + + visited[pointer] = True + + if instr[0] == "acc": + acc += int(instr[1]) + pointer += 1 + elif instr[0] == "nop": + pointer += 1 + elif instr[0] == "jmp": + pointer += int(instr[1]) + + if pointer >= len(code): + return acc + + return None + +with open("input", 'r') as input: + code = [line.strip() for line in input.readlines()] + candidates = [] + for idx, instr in enumerate(code): + parts = instr.split(" ") + if parts[0] == "acc": + continue + + value = int(parts[1]) + if parts[0] == "nop" and ((value < 2 and value > -2) or (idx + value) > len(code) + 1): + continue + + candidates.append(idx) + + + print(len(candidates)) + for candidate in candidates: + new_code = list(code) + if new_code[candidate].startswith("nop"): + new_code[candidate] = new_code[candidate].replace("nop", "jmp") + else: + new_code[candidate] = new_code[candidate].replace("jmp", "nop") + + print(f"Checking candidate {candidate}...") + + result = check(new_code) + if result: + print(f"Found candidate with acc: {result}") + break + + # visited = [False for _ in range(len(code) + 1)] + # acc = 0 + # pointer = 0; + + # while not visited[pointer]: + # instr = code[pointer].split(" ") + + # visited[pointer] = True + + # if instr[0] == "acc": + # acc += int(instr[1]) + # pointer += 1 + # elif instr[0] == "nop": + # pointer += 1 + # elif instr[0] == "jmp": + # pointer += int(instr[1]) + + # print(acc) diff --git a/Day 9/input b/Day 9/input new file mode 100644 index 0000000..20f8901 --- /dev/null +++ b/Day 9/input @@ -0,0 +1,1000 @@ +16 +19 +41 +7 +20 +3 +45 +40 +37 +25 +5 +22 +43 +48 +4 +23 +18 +47 +28 +11 +10 +42 +35 +6 +34 +21 +8 +9 +12 +7 +13 +38 +14 +15 +16 +17 +20 +19 +60 +22 +24 +27 +46 +44 +28 +18 +70 +23 +42 +25 +26 +21 +29 +30 +91 +34 +31 +32 +33 +35 +43 +41 +45 +47 +65 +39 +48 +49 +46 +44 +50 +51 +52 +63 +53 +54 +89 +59 +61 +64 +66 +105 +87 +68 +74 +92 +93 +124 +83 +154 +97 +217 +176 +120 +94 +122 +111 +106 +107 +246 +127 +123 +173 +125 +199 +142 +210 +151 +293 +185 +175 +207 +177 +299 +201 +383 +232 +200 +219 +450 +394 +213 +229 +234 +296 +401 +372 +267 +324 +530 +317 +328 +854 +352 +730 +518 +586 +377 +414 +560 +932 +432 +541 +453 +759 +447 +442 +463 +619 +749 +584 +591 +729 +641 +1049 +645 +947 +766 +784 +994 +877 +1307 +824 +846 +1661 +874 +1094 +1374 +889 +905 +1689 +1026 +1340 +1175 +1225 +1229 +1375 +2049 +2532 +1411 +2064 +1640 +1550 +1608 +1670 +2196 +1713 +2221 +2279 +2255 +2845 +1794 +1915 +1931 +4328 +2201 +2366 +2400 +2404 +3051 +2899 +3045 +3402 +3968 +2961 +3158 +3190 +3220 +5333 +6241 +3507 +3914 +5120 +3709 +4186 +4194 +3725 +3846 +7760 +4567 +5421 +7524 +8645 +5365 +6363 +11492 +6006 +6697 +6378 +6119 +6348 +8641 +11438 +7216 +10087 +7232 +7434 +7555 +10686 +13797 +9211 +7571 +11799 +17642 +13351 +15861 +11371 +11484 +11713 +12125 +12354 +12384 +23283 +12467 +15559 +13564 +14448 +21336 +21571 +24509 +14666 +23755 +15126 +19284 +25064 +27358 +18942 +22855 +28026 +25918 +23084 +43793 +24097 +23838 +46367 +24738 +24851 +26915 +26031 +50015 +28012 +29114 +52869 +29792 +47310 +47935 +38226 +34068 +44006 +41797 +42026 +42780 +46693 +46922 +48576 +47181 +74607 +48835 +48689 +52946 +89732 +54043 +54927 +63860 +116729 +57126 +76295 +68018 +71589 +81006 +206461 +82644 +85803 +83823 +88978 +113615 +95757 +166027 +143775 +95870 +102732 +97524 +103762 +103616 +126516 +108970 +135933 +165273 +120986 +125144 +184622 +162098 +139607 +152595 +163650 +166467 +264830 +169626 +221014 +198602 +384664 +204840 +193394 +199486 +493634 +324229 +201140 +207378 +229956 +278596 +234114 +414408 +246130 +294770 +264751 +292202 +301705 +476824 +420500 +330117 +428392 +368228 +493372 +391996 +392880 +464237 +400772 +394534 +441492 +408518 +431096 +575606 +437334 +464070 +480244 +498865 +716113 +771594 +918316 +556953 +593907 +820388 +825630 +1346708 +762762 +1012940 +760224 +823976 +784876 +839614 +803052 +795306 +878826 +1244544 +845852 +868430 +901404 +1826952 +944314 +979109 +1055818 +1150860 +1739620 +1317177 +1957222 +1378783 +1586738 +2882770 +1522986 +2903915 +1545100 +1555530 +1580182 +2737598 +2424390 +1671482 +1641158 +1714282 +1747256 +1769834 +1812744 +2218581 +1923423 +3078516 +3350016 +2206678 +2468037 +3969490 +2695960 +2901769 +4142004 +7319506 +3100630 +3103168 +3186258 +3125282 +3135712 +3221340 +3932863 +3953934 +3312640 +4714513 +3461538 +5321749 +3582578 +3736167 +4825192 +4902638 +4674715 +5108447 +5668216 +8793498 +6214409 +5799128 +6002399 +9260666 +8668447 +6203798 +9822960 +6260994 +6346622 +6357052 +6533980 +6774178 +9463937 +16238115 +8485216 +11117047 +11208695 +7318745 +15015069 +11021337 +12427192 +9783162 +11467344 +11670615 +12737778 +11801527 +12002926 +12263393 +12464792 +12550420 +12703674 +16169582 +24740704 +12880602 +12891032 +19693911 +14092923 +15803961 +18268378 +17101907 +18340082 +18527440 +24097807 +20804499 +29896884 +21250506 +22674194 +25441452 +23472142 +23804453 +35735535 +37205496 +36695485 +26983955 +25254094 +25584276 +34697022 +34331401 +25771634 +28694993 +42331893 +31194830 +32905868 +35370285 +55135900 +36867522 +39331939 +46772001 +66315894 +43924700 +46504600 +47928288 +47276595 +48726236 +49388729 +50838370 +80792222 +51025728 +52755589 +51355910 +72237807 +86103940 +54466627 +56966464 +59889823 +83372122 +70526769 +68276153 +103738465 +76199461 +83256639 +85836539 +100683877 +90429300 +116162507 +95893329 +95204883 +98114965 +100227099 +100414457 +123263535 +108322374 +102381638 +104111499 +200641556 +168503252 +111433091 +114356450 +171210646 +138802922 +144475614 +170941226 +151532792 +159456100 +162036000 +169093178 +176265839 +185634183 +250236013 +191098212 +196307786 +195431982 +266147499 +248587113 +202796095 +267778474 +206493137 +322474018 +215544590 +225789541 +253159372 +283278536 +303931714 +340783400 +290335714 +375000690 +474376748 +310988892 +468912719 +388430278 +453032108 +372573625 +376732395 +518014487 +386530194 +398228077 +401925119 +472640636 +418340685 +409289232 +520937846 +459652509 +478948913 +536778433 +865479107 +678932404 +587210250 +594267428 +715784090 +466456641 +1108148096 +1105224737 +1325131616 +846182703 +749306020 +945405554 +770801702 +763262589 +816568762 +2040915706 +800153196 +946067665 +827629917 +868941741 +875745873 +926109150 +1353347195 +1003235074 +1053666891 +1442194993 +1924716858 +1060724069 +1182240731 +1646547575 +1215762661 +1520107722 +1512568609 +1534064291 +1549459216 +1773697582 +1853820087 +1696910852 +1563415785 +1692314635 +1627783113 +2455413030 +1753739067 +1744687614 +1801855023 +1878980947 +1929344224 +2185475805 +2114390960 +2242964800 +4200100644 +2276486730 +4155467677 +2398003392 +2735870383 +3330153621 +3806705595 +3204883244 +5606640351 +3241773851 +4152323882 +3191198898 +3255730420 +3308103399 +3320097748 +3372470727 +4142691006 +4993053921 +3808325171 +5718101140 +6079081591 +4114820029 +4299866765 +5319274204 +4519451530 +4674490122 +5012357113 +5133873775 +5589202290 +6043973782 +8389604195 +6396082142 +6432972749 +8926738099 +6446929318 +10753571713 +6499302297 +9026204539 +6628201147 +6692568475 +7180795898 +8634271559 +7923145200 +8108191936 +8819318295 +8414686794 +8789310151 +8974356887 +9193941652 +9531808643 +9686847235 +10146230888 +10723076065 +11633176072 +15237915434 +19556321272 +12829054891 +12932275046 +13680098195 +15236239469 +15133573856 +20409923300 +15107255269 +25313274267 +14800760411 +15103941098 +16031337136 +16337831994 +17203996945 +17793675182 +17389043681 +17763667038 +18168298539 +18725750295 +26920852324 +40551189701 +20869306953 +28837173017 +27936310160 +33698361844 +25761329937 +26509153086 +31138592405 +28480858606 +29904701509 +34593040626 +46600840055 +29908015680 +30832097547 +31135278234 +31441773092 +32369169130 +33726875675 +46226216698 +35152710719 +53878461014 +35931965577 +63603063353 +52682182261 +46630636890 +47378460039 +59071588394 +52270483023 +53697640097 +54242188543 +95003553971 +54990011692 +58385560115 +59812717189 +67067243811 +86431784784 +67373738669 +113293460509 +61967375781 +95044836445 +114061600086 +66096044805 +68879586394 +71084676296 +113697880701 +82562602467 +83310425616 +94009096929 +98901119913 +99648943062 +101076100136 +106512671566 +108687651789 +107939828640 +109232200235 +200521768495 +113375571807 +118198277304 +125908761994 +128063420586 +167172144941 +136253325063 +184386525752 +130846962175 +134975631199 +137180721101 +139964262690 +270811224865 +153647278763 +165873028083 +336775093558 +177319522545 +200725043198 +198550062975 +208336594851 +207588771702 +250556292908 +216627480429 +217172028875 +222607772042 +559382865600 +249628896870 +268027683276 +253972182580 +258910382761 +265822593374 +317283785235 +329397025150 +348300857541 +272156352300 +533850276650 +293611541453 +713030144363 +330966801308 +415501924953 +449475874845 +375869585520 +424216252131 +425508623726 +415925366553 +424760800577 +433799509304 +439235252471 +439779800917 +481518154803 +521999865856 +531066735061 +512882565341 +547583724033 +524732976135 +755183053439 +754157825727 +565767893753 +1072316700168 +1053066600917 +624578342761 +669481126973 +706836386828 +746468726261 +1058377852065 +800085837651 +791794952073 +840141618684 +840686167130 +1371047069022 +1285224560788 +1090500869888 +1193393078198 +921297955720 +994400720144 +1034882431197 +1235249020726 +1331414729589 +1113351617786 +1190346236514 +1464719961445 +1312236620014 +1272604280581 +1640772004781 +1294059469734 +1376317513801 +1415949853234 +1765214238893 +1538263678334 +1858463689716 +1591880789724 +1631936570757 +2304861580129 +2557828841369 +1915698675864 +2193902236301 +2225228667711 +2107752337930 +2111644192234 +2507853301307 +2328941900931 +3884170815108 +2303697854300 +2385955898367 +2462950517095 +2566663750315 +2584840900595 +2648921794382 +3234781203517 +4017892469124 +2792267367035 +3223817360481 +3130144468058 +5539642783646 +3547635246621 +3507579465588 +3739688908687 +4023451013794 +4027342868098 +4219396530164 +4301654574231 +6608291914389 +5731670661788 +6299846832623 +4714897799298 +4791892418026 +6027048570552 +5620737101884 +4848906415462 +5255217884130 +5151504650910 +5233762694977 +10054391438650 +5922411835093 +9470047081714 +6016084727516 +6677779714679 +6637723933646 +7055214712209 +7287324155308 +10794903620896 +16354238271273 +8934294329462 +9068302945626 +8521051104395 +11148753248085 +9506790217324 +17341715593958 +12704828285231 +9563804214760 +11829284365589 +10000411066372 +10082669110439 +17589354050021 +10385267345887 +11073916486003 +11156174530070 +18361240641311 +11938496562609 +12653808661162 +12693864442195 +13315503648325 +15706026879272 +18436077403393 +16794114372632 +26009368090520 +30035580036153 +18906318450282 +18027841321719 +18084855319155 +20580706703327 +19070594432084 +28470122665042 +19564215281132 +19646473325199 +27868030858635 +38007713966510 +20467936456326 +34878969691787 +21459183831890 +23727725147165 +31560127111444 +54525443016986 +24592305223771 +43351083684478 +51124342392576 +29021530527597 +58606694838952 +34821955694351 +35700432822914 +45079962522604 +49929306496932 +36934159772001 +37155449751239 +58475650422836 +38634809713216 +38717067757283 +41105657157089 +60883174898404 +40114409781525 +41927120288216 +44195661603491 +45060241680097 +45186908979055 +56152432335215 +48320030370936 +53613835751368 +59414260918122 +78173039378829 +82041530069741 +79082570039455 +63843486221948 +70522388517265 +74936365475876 diff --git a/Day 9/one.py b/Day 9/one.py new file mode 100755 index 0000000..f758876 --- /dev/null +++ b/Day 9/one.py @@ -0,0 +1,32 @@ +#!/bin/python + +def check(numbers, num): + for i in numbers: + for j in numbers: + print(f"Checking {i} + {j} = {num}") + if i + j == num: + return True + + return False + +def rotate(numbers, num): + del numbers[0] + numbers.append(num) + return numbers + +with open("input", 'r') as input: + numbers = [] + for _ in range(26): + numbers.append(int(next(input).strip())) + + for num in input: + num = int(num.strip()) + if not check(numbers, num): + print(num) + break + + numbers = rotate(numbers, num) + + + + diff --git a/Day 9/two.py b/Day 9/two.py new file mode 100755 index 0000000..d000feb --- /dev/null +++ b/Day 9/two.py @@ -0,0 +1,59 @@ +#!/bin/python + +def check(numbers, num): + for i in numbers: + for j in numbers: + if i + j == num: + return True + + return False + +def rotate(numbers, num): + del numbers[0] + numbers.append(num) + return numbers + +def sum_range(all_numbers, i, j): + range = all_numbers[i:j+1] + range.sort() + return range[0] + range[-1] + +def find_sum(num, all_numbers): + for i,i_val in enumerate(all_numbers): + j = i + 1 + while j < len(all_numbers): + j_val = all_numbers[j] + print(f"Checking {i}:{i_val} to {j}:{j_val}") + if check_sum(all_numbers, i, j+1, num): + print(f"Found {i} to {j} the sum is {sum_range(all_numbers, i, j)}") + return + j += 1 + + +def check_sum(all_numbers, i, j, num): + sum = 0 + for to_sum in all_numbers[i:j]: + sum += to_sum + if sum > num: + return False + return sum == num + +with open("input", 'r') as input: + all_numbers = [int(i.strip()) for i in input.readlines()] + numbers = [] + for i in range(26): + numbers.append(all_numbers[i]) + + i = 26 + while i < len(all_numbers): + num = all_numbers[i] + if not check(numbers, num): + print(num) + find_sum(num, all_numbers) + break + + numbers = rotate(numbers, num) + i += 1 + + +