From 92cb0d36d500f149e67c32fa0b3efb733b889509 Mon Sep 17 00:00:00 2001 From: FoM <30684972+OrsoEric@users.noreply.github.com> Date: Sun, 8 Dec 2024 10:12:26 +0100 Subject: [PATCH] save to file the valid equations with valid operators. --- solutions/orso/day07/day_7.py | 25 +- solutions/orso/day07/day_7_formulation.txt | 22 ++ solutions/orso/day07/day_7_output_part_1.txt | 380 +++++++++++++++++++ 3 files changed, 426 insertions(+), 1 deletion(-) create mode 100644 solutions/orso/day07/day_7_output_part_1.txt diff --git a/solutions/orso/day07/day_7.py b/solutions/orso/day07/day_7.py index 653d8a0..dc7b588 100644 --- a/solutions/orso/day07/day_7.py +++ b/solutions/orso/day07/day_7.py @@ -140,6 +140,18 @@ def solve(self) -> bool: b_continue = False #solution not found return True #FAIL + def get_equation_string(self)->str: + """ + generate a string of the equation: "5=3+2" + """ + if len(self.s_operators) <= 0: + return str() + s_result = f"{self.n_result}={self.ln_arguments[0]}" + for n_index, s_operator in enumerate(self.s_operators): + s_result += f" {s_operator} {self.ln_arguments[n_index+1]}" + logging.debug(f"{s_result}") + return s_result + def __init__(self): """ Initialize the Patrol_route class @@ -175,7 +187,17 @@ def solve(self) -> int: else: logging.debug(f"NOT SOLVABLE:") return n_accumulator_result - + + def save_results( self, s_filename : str ) -> bool: + try: + with open(s_filename, 'w') as file: + for st_equation in self.glst_equation: + s_equation = st_equation.get_equation_string() + print(s_equation) + if (len(s_equation) > 0): + file.write(s_equation + '\n') + except Exception as e: + logging.error(f"Save Failed: {e}") #-------------------------------------------------------------------------------------------------------------------------------- # MAIN #-------------------------------------------------------------------------------------------------------------------------------- @@ -201,4 +223,5 @@ def solve(self) -> int: cl_operator_finder.load_equations(gs_filename_data) cl_operator_finder.show() n_accumulator_result = cl_operator_finder.solve() + cl_operator_finder.save_results('day07\day_7_output_part_1.txt') print(f"accumulator: {n_accumulator_result}") \ No newline at end of file diff --git a/solutions/orso/day07/day_7_formulation.txt b/solutions/orso/day07/day_7_formulation.txt index f1be155..93d6624 100644 --- a/solutions/orso/day07/day_7_formulation.txt +++ b/solutions/orso/day07/day_7_formulation.txt @@ -51,5 +51,27 @@ In the above example, the sum of the test values for the three equations listed Determine which equations could possibly be true. What is their total calibration result? +--- Part Two --- + +The engineers seem concerned; +the total calibration result you gave them is nowhere close to being within safety tolerances. +Just then, you spot your mistake: some well-hidden elephants are holding a third type of operator. + +The concatenation operator (||) combines the digits from its left and right inputs into a single number. +For example, 12 || 345 would become 12345. All operators are still evaluated left-to-right. + +Now, apart from the three equations that could be made true using only addition and multiplication, +the above example has three more equations that can be made true by inserting operators: + + 156: 15 6 can be made true through a single concatenation: 15 || 6 = 156. + 7290: 6 8 6 15 can be made true using 6 * 8 || 6 * 15. + 192: 17 8 14 can be made true using 17 || 8 + 14. + +Adding up all six test values (the three that could be made before using only + and * plus the new three that can now be made by also using ||) +produces the new total calibration result of 11387. + +Using your new knowledge of elephant hiding spots, determine which equations could possibly be true. What is their total calibration result? + + diff --git a/solutions/orso/day07/day_7_output_part_1.txt b/solutions/orso/day07/day_7_output_part_1.txt new file mode 100644 index 0000000..1a757d2 --- /dev/null +++ b/solutions/orso/day07/day_7_output_part_1.txt @@ -0,0 +1,380 @@ +31084=8 + 67 + 8 + 735 * 38 +40541461584=5 * 81 * 9 * 4 + 32 * 43 * 283 * 228 +6208=915 * 6 + 2 + 539 + 148 + 29 +21276000=8 + 5 * 5 + 91 + 6 + 5 * 8 + 6 + 8 * 985 * 2 * 8 +17115994=69 * 321 + 254 * 764 + 3 + 99 +4312695565=158 + 8 * 716 * 615 + 95 * 59 +391=1 + 326 + 64 +1614=63 + 645 + 4 + 3 + 31 + 868 +4258805=68 + 532 * 78 * 91 + 5 +45111648=47 + 98 + 45 * 855 + 998 * 46 * 6 +13608006=3 + 5 + 7 + 7 * 3 + 602 + 7 * 4 * 7 * 720 + 6 +5449=4 + 2 * 907 + 7 +2930=18 + 6 + 7 + 555 * 5 +19449=6 + 1 + 9 + 4 + 4 * 769 + 8 + 1 + 79 + 905 +4595553=298 * 3 * 4 * 257 * 5 + 3 + 345 + 45 +2905504=46 * 58 + 514 + 626 * 763 +652568=7 * 197 + 871 * 290 + 68 +722=2 + 21 + 337 + 5 + 357 +528=55 + 1 + 5 * 8 + 9 + 31 +2157=8 * 2 + 1 * 93 + 8 + 568 +29090880=45 * 28 * 37 * 8 * 78 +1262763=1 + 1 * 27 * 729 + 93 * 16 * 2 + 75 +52192=104 + 89 * 6 * 45 + 10 + 72 +20860682976=546 * 3 * 7 + 930 * 7 * 954 * 42 * 6 +224616=441 + 46 * 8 + 36 + 73 * 8 + 3 + 45 * 7 +358087=7 * 236 * 9 + 45 * 2 + 9 * 3 + 9 + 6 * 4 + 2 + 5 +6354432=55 + 792 * 7 * 153 + 639 * 7 +5489=69 * 8 * 9 + 515 + 6 +30367442=2 + 657 * 6 * 4 * 384 * 5 + 673 + 49 +2846739576=4 * 8 + 743 + 9 + 3 + 9 * 829 * 719 * 6 +53361=85 * 3 + 592 * 1 * 63 +9082152=182 * 66 * 9 + 8 * 6 * 7 + 7 + 2 + 195 * 2 +484430=2 + 5 * 64 + 7 + 49 * 961 + 83 + 3 +12403134=92 + 6 + 34 * 58 * 6 * 5 + 7 * 9 + 6 * 6 +33615296=312 + 44 * 55 + 9 * 3 + 1 * 572 +183192=35 + 8 * 5 + 5 + 612 + 28 * 71 * 3 + 4 + 8 +362827266=86 * 643 + 395 * 8 + 738 * 813 +5983=3 * 888 + 5 + 291 * 2 + 57 + 6 +902757501=855 + 24 * 627 + 1 * 63 * 26 + 9 +177442819=6 * 9 * 401 * 2 * 4 + 52 * 256 * 4 + 3 +223398085=57 * 3 * 1 * 8 + 11 * 50 * 45 * 8 * 9 + 85 +76471=81 * 472 * 2 + 1 + 6 +144=90 + 14 + 40 +2954988=6 * 3 * 3 * 16 * 4 * 95 + 2 * 1 + 7 * 3 + 9 * 3 +1666626=282 + 573 + 74 * 39 * 1 * 46 +20485976=47 * 155 + 643 * 323 + 3 * 8 +5790=8 + 6 + 4 * 3 + 7 + 43 * 1 * 9 + 8 + 4 + 17 * 6 +1423=232 * 6 + 23 + 2 + 6 +2214885600=1 + 5 + 2 * 1 * 3 * 50 * 183 * 41 * 82 * 3 +16294=29 * 134 + 8 + 65 * 4 * 1 + 455 + 3 +10536237=6 + 6 + 3 + 9 + 1 + 1 + 4 * 724 + 4 * 5 + 1 * 97 +284990=5 * 5 * 5 * 91 + 7 * 5 + 88 * 5 +37636247=3 * 875 + 3 * 39 + 615 + 6 * 73 * 5 + 2 +278838736=254 * 851 * 15 * 86 + 76 +35266920=4 + 8 * 65 * 481 * 94 +2342060=5 * 55 * 2 * 43 * 99 + 710 +1337677=769 + 562 * 5 * 67 * 3 + 9 + 13 +20708670=1 + 7 * 8 * 1 * 9 * 9 + 6 * 70 + 6 + 1 + 3 * 57 +422584=1 * 6 + 185 + 2 * 95 * 23 + 1 + 878 +16961283369=7 * 614 * 720 * 9 * 609 * 1 + 9 +273426612=519 + 24 * 87 * 2 + 656 * 3 * 958 +449=250 + 94 + 8 + 9 + 88 +69949442=8 * 92 * 4 * 1 * 15 * 33 * 8 * 3 * 1 * 2 + 2 +2540247614=578 * 3 * 346 * 73 * 29 + 5 + 5 + 9 * 2 +527906=54 + 9 * 9 * 931 + 29 +139782=11 + 33 * 6 * 526 + 918 +8668810=40 + 8 + 6 + 3 * 6 + 2 * 84 * 2 * 2 * 75 + 7 + 3 +20610=1 * 152 * 3 + 2 * 45 +359112=323 * 5 + 47 * 54 + 7 + 6 + 3 + 8 + 4 + 2 * 4 +3198=1 + 7 * 8 + 8 + 24 + 7 * 1 * 4 + 41 * 7 + 27 +41189=13 + 9 * 3 * 624 + 5 +195264=4 * 2 * 339 * 36 * 2 +16012371600=6 * 9 * 6 + 3 + 6 * 3 * 95 * 3 * 76 * 4 * 185 +1175718380=6 + 340 * 5 * 911 * 746 +51156=3 * 4 * 4 + 540 * 87 +4831584=2 * 43 * 8 * 2 + 55 + 5 * 7 * 5 + 69 * 96 +220190=7 + 974 * 32 + 38 * 1 * 7 + 4 + 172 + 4 +114640=3 * 7 + 31 * 52 * 7 * 6 + 1 + 772 + 299 +10759=23 * 1 + 6 * 12 + 7 + 2 * 1 * 4 + 81 + 28 * 7 +15606936=96 + 6 + 40 * 639 * 172 +1134226=9 * 824 + 46 * 152 + 2 +640=5 * 32 * 2 * 2 +35646030=42 * 1 * 885 * 137 * 7 +271367519=7 * 45 * 964 + 127 + 96 * 893 +495104=1 * 960 * 8 + 56 * 64 +3480=7 * 1 * 12 + 3 * 1 * 40 +14270=44 + 8 + 875 + 1 + 9 + 6 * 1 + 8 * 3 * 5 + 5 +2461824=1 + 4 + 1 + 9 * 7 * 12 * 61 + 71 + 1 * 4 * 1 * 8 +53575=6 * 73 + 9 + 7 * 118 + 3 +3128658=93 + 9 + 2 * 2 * 20 * 8 * 94 + 331 + 7 +223592=5 * 43 + 381 + 5 * 9 + 4 * 5 + 884 * 8 +12112807054=870 * 119 * 7 * 61 + 15 * 274 + 4 +279477744=33 * 3 * 9 * 411 + 87 * 763 +1760418=99 + 34 * 1 * 5 + 99 * 96 * 4 + 27 * 6 +57612060=6 * 270 * 53 * 61 * 11 +431112=3 * 19 * 108 + 92 * 69 +70193=4 + 53 + 9 + 2 * 7 + 701 * 59 + 746 + 4 +81430304=124 * 4 * 989 * 2 * 83 +494808=87 + 6 * 665 + 6 * 8 +913887=3 * 6 + 7 + 2 * 752 * 9 + 5 * 1 + 36 * 5 + 2 * 1 +502132176=9 + 109 + 624 * 964 * 702 +701412=2 * 5 + 84 + 648 + 97 * 836 + 8 +59813=595 * 97 + 657 + 457 + 984 +297534=348 * 61 * 1 * 1 * 2 * 7 + 296 + 46 +143500=618 + 32 + 8 * 31 + 19 + 1 + 82 * 7 +311740=5 + 76 * 5 * 37 + 1 + 1 + 597 + 3 * 20 +746258=1 + 3 + 61 * 6 + 48 * 21 + 4 + 11 * 81 + 5 +310680=6 + 7 + 59 + 782 + 9 * 45 * 8 +170615594=447 + 3 * 7 + 74 * 35 * 7 + 7 * 6 * 6 * 6 + 2 +48328=3 + 7 * 4 + 7 + 9 + 149 * 9 + 456 * 7 * 3 + 7 +35341=5 * 76 * 93 + 1 +606=4 + 80 + 50 * 4 + 70 +12733=65 + 9 * 2 * 86 + 5 +19642752=696 + 5 + 7 * 544 * 51 +6024648=8 * 86 + 75 * 47 * 168 +104509650=5 + 1 * 482 + 62 * 72 + 597 * 7 * 70 +224=2 + 4 * 6 + 2 + 86 + 100 +25781529=60 * 9 * 8 * 4 * 7 + 65 + 9 + 2 + 4 * 213 + 9 +15984006=38 + 6 * 5 + 9 * 727 + 7 + 6 + 4 * 96 + 1 + 5 +911=7 * 6 + 1 + 868 * 1 +281978=561 * 4 + 9 * 5 * 5 + 56 + 1 + 4 * 1 + 9 * 5 + 3 +804636=50 * 6 + 26 + 542 * 927 +4368=9 + 87 * 1 + 8 * 42 +816=5 + 2 + 5 + 6 * 45 + 6 +202=1 + 57 + 3 + 8 * 1 + 4 + 28 * 2 +128584480=34 * 6 * 835 + 650 * 94 * 8 +14447=166 * 3 * 28 + 420 + 83 +100153=4 * 389 + 35 + 70 * 60 + 43 + 450 +6746=4 + 6 * 583 + 93 + 784 + 39 +2105210=7 + 4 + 8 * 2 + 6 * 9 + 8 * 31 + 7 * 56 * 3 + 2 +24206=25 + 599 + 13 * 2 * 19 +1157600=383 + 930 + 42 + 92 * 800 +135424=274 * 494 + 29 + 6 + 33 +912=6 + 1 + 9 + 58 * 1 + 838 +1483426560=4 + 6 * 1 + 69 + 801 * 406 * 692 * 6 +1291767304=41 + 475 * 889 * 4 * 88 + 65 * 8 +4740630=941 + 32 * 56 + 2 * 87 +145255683=6 + 928 * 2 * 270 * 96 * 3 + 3 +2804256=2 + 563 + 36 + 41 * 6 * 91 * 8 +3662=592 * 6 + 91 + 11 + 8 +321150750=6 * 3 + 33 + 7 + 6 * 191 + 1 * 74 * 355 +125188150=1 * 84 * 8 * 299 + 7 + 6 + 3 * 623 + 38 +371329981=53 + 730 * 8 * 78 * 760 + 4 + 57 * 1 +2610384=6 + 74 * 93 + 329 * 8 * 42 +2051303=68 + 6 * 53 * 523 + 6 + 91 +3583491=58 * 3 + 3 * 8 + 852 * 79 * 4 * 5 + 5 + 46 +660996=61 + 61 * 7 * 43 * 18 +1125072=6 + 82 * 64 * 2 + 3 + 7 + 444 * 2 + 3 * 48 +26483808=5 + 6 + 9 * 862 * 16 + 33 * 96 +34849136=7 * 14 * 6 + 1 + 9 * 857 * 68 + 88 +2142047=55 * 2 * 6 + 1 * 60 + 3 * 9 + 40 * 6 + 5 +18329059=1 + 7 * 398 + 2 * 523 * 11 + 1 +1231=567 + 1 + 29 + 21 + 1 + 612 +7192=4 + 881 + 3 + 11 * 8 +984797352=86 * 84 * 99 * 3 * 1 * 459 +4330380=444 * 3 * 8 + 3 + 797 * 7 * 6 * 9 + 1 + 5 + 6 +644000=2 * 4 + 89 + 4 + 17 + 7 * 92 * 14 * 1 * 4 +275310=6 * 11 + 31 + 58 * 888 + 4 + 2 + 9 * 2 +1100140=3 + 8 * 9 * 91 * 3 + 9 + 466 * 5 + 6 * 8 + 3 + 9 +26416153=5 * 3 * 64 * 9 + 4 * 764 + 7 + 7 + 5 * 4 + 6 + 7 +5390070=38 + 5 * 77 + 813 + 35 * 3 * 54 * 8 + 6 +516=7 + 4 + 6 * 4 + 1 + 70 + 9 + 66 * 1 + 5 + 39 * 2 +12159=9 * 6 * 1 * 225 + 9 +83601=68 + 30 * 8 * 5 + 1 + 56 + 3 + 1 * 3 * 7 +478266=1 + 4 + 8 + 6 * 3 + 724 * 612 + 8 + 286 +297000=49 * 50 + 820 + 9 + 90 + 6 * 88 +185356128=44 + 5 * 401 + 7 * 82 * 115 + 48 +246521=787 + 6 + 4 + 6 * 307 +86285202=25 * 96 * 42 * 856 + 402 +214023=5 * 793 + 66 + 7 * 53 + 9 +6755=270 * 2 + 799 + 12 * 5 +14223284=9 * 9 * 7 + 5 * 7 * 8 + 2 * 111 * 1 + 45 * 4 + 8 +2291081=3 + 2 * 632 * 725 + 81 +17262=105 + 4 * 3 * 1 * 3 + 9 + 3 + 240 * 2 * 7 * 1 +157051=9 + 7 * 6 * 181 + 6 + 9 * 3 * 3 + 451 + 81 +45459840=8 * 42 + 71 + 1 + 3 * 8 * 4 * 9 + 8 + 9 * 384 +526=95 + 9 + 4 + 1 + 417 +101160=5 * 5 + 6 + 5 + 9 * 4 + 873 * 8 * 4 + 3 * 3 + 63 +74700=86 + 2 + 765 + 47 * 83 +818480=3 + 4 * 8 + 966 * 10 + 3 + 7 + 1 * 4 * 5 * 4 * 1 +877=71 + 10 + 689 + 32 + 75 +53325209060=554 * 965 * 941 * 2 * 53 +12276=2 + 5 + 55 * 3 * 66 +8831966=2 + 56 * 30 + 2 * 2 * 39 * 65 + 2 + 9 + 8 + 7 +237094=3 + 3 + 311 + 50 * 646 + 12 +1347305=9 + 4 * 8 + 65 * 664 * 3 * 4 + 3 + 701 + 9 +70155=91 * 2 + 88 * 257 + 706 + 58 + 1 +60468016=640 + 1 * 23 * 5 + 27 + 726 * 812 +1581985302=83 * 9 * 258 + 3 + 8 * 38 * 72 * 3 + 6 +157694208=94 * 8 * 52 * 3 + 5 + 15 * 56 * 1 * 3 * 8 +4548610=66 + 9 * 3 + 3 * 7 * 57 * 50 + 1 + 9 +21119484=38 + 822 * 28 + 29 * 876 +5946398=661 + 589 * 67 * 71 + 91 + 57 +151648362=894 + 75 + 5 * 9 + 93 * 54 * 317 +10321152=99 + 807 * 712 * 2 * 8 +114489=6 + 5 + 4 * 8 + 31 * 84 + 37 * 9 +106820010=722 * 269 * 10 + 2 * 55 +1480075=44 + 2 * 198 * 9 * 3 + 71 + 691 * 6 + 7 +28827=19 + 1 * 5 + 7 + 6 * 9 + 78 * 1 * 8 + 849 * 3 +5508361=495 * 4 * 214 * 13 + 1 +4988516=5 + 33 * 55 * 12 + 568 + 66 * 2 * 97 +1198391800=231 * 965 * 8 * 84 + 2 + 93 * 1 * 4 * 2 +126143604=86 * 2 * 6 * 463 * 88 + 55 + 5 * 3 +12681=5 * 7 * 2 + 9 + 4 + 7 + 44 * 2 * 5 + 65 + 4 * 9 +93840=98 + 38 * 46 * 15 +217780=419 + 3 * 516 + 23 + 5 +33264=447 + 87 + 973 + 5 * 22 +12935=711 + 5 * 6 * 3 + 47 +112424=5 * 1 + 8 + 936 + 82 + 8 + 183 * 92 +723672=347 + 67 * 1 * 2 * 874 +3066=51 * 5 + 8 + 8 * 8 + 898 +110283391=3 * 52 + 3 + 53 * 8 * 3 * 8 + 6 * 3 * 903 + 1 +4536=83 + 5 + 81 * 9 + 747 * 2 +605783111392=404 * 91 * 601 * 37 * 741 + 4 +58853775=4 * 485 * 79 + 4 * 384 + 399 +47889063=516 + 64 + 89 + 984 * 999 * 29 +23241016=7 * 3 * 5 * 5 * 6 * 1 + 3 * 819 + 27 * 9 + 9 + 1 +781268=376 + 6 + 743 + 4 * 692 * 1 +24=7 + 5 * 1 + 9 + 3 +7258534=70 * 96 + 523 + 840 * 898 +12932425=928 * 6 * 43 + 57 + 8 * 54 * 1 + 3 + 9 + 7 +258400=70 + 120 * 34 * 40 +895=81 + 303 + 38 * 2 + 51 +80809920=932 + 69 + 727 * 47 * 995 +21779938=9 * 411 * 92 * 64 + 226 +1444191=556 * 9 + 11 + 4 + 6 + 5 * 1 * 41 + 83 * 7 +1003880435=19 * 82 * 746 + 977 * 863 +4155=72 + 810 + 13 * 4 + 575 +96614034=15 + 6 * 361 * 72 + 6 + 2 * 3 + 6 * 59 +1688=5 + 9 * 1 * 5 * 3 * 8 + 8 +9197318140=2 + 59 * 6 + 1 * 690 * 8 + 1 * 5 * 227 * 4 +46479360=61 + 7 + 4 + 2 * 9 + 7 + 39 * 272 * 6 * 5 * 8 +1922=6 * 233 + 457 + 6 + 61 +6955=9 + 7 * 8 + 4 + 5 + 7 + 4 * 2 * 4 + 5 + 202 * 5 +8117862=437 + 1 * 6 + 921 + 2 * 381 + 46 * 6 +37690=3 + 720 * 52 + 6 * 1 + 88 * 1 +21474=9 * 9 + 9 + 1 * 17 + 4 + 784 + 8 + 4 + 39 * 9 +3277745=18 + 2 + 5 + 4 * 414 + 89 * 271 +5792=618 + 29 + 68 * 8 + 3 + 69 +486043544=3 + 230 + 57 * 52 + 54 * 74 * 62 * 7 +5637600=58 * 9 * 54 * 25 * 8 +4977330=9 + 7 * 6 * 79 + 3 * 9 + 8 + 838 * 3 * 4 + 7 * 6 +22497=82 * 79 + 983 + 1 * 1 * 3 + 9 + 102 +16502056=8 * 6 + 58 * 319 * 488 + 5 + 819 +756793=88 * 3 + 3 * 944 + 192 * 3 + 1 + 72 +4214=6 * 697 * 1 + 5 + 27 +1618088=76 + 4 + 6 * 1 + 7 * 7 * 62 + 90 * 5 + 1 * 8 +266689086=3 + 2 * 17 * 83 * 5 * 6 + 8 * 42 * 6 * 5 + 3 + 3 +1326=423 + 846 + 4 + 1 + 8 + 44 +12213922=73 * 703 * 14 * 1 * 17 +37380255=80 + 1 * 935 + 87 * 493 + 4 + 5 +2250=29 * 1 * 75 + 6 + 69 +91083792=4 + 7 + 236 * 878 * 7 * 5 + 6 * 4 * 3 * 1 * 1 +335524376=8 + 53 * 51 + 68 * 668 * 158 +497340=9 * 3 + 762 * 7 * 3 + 6 + 3 * 5 * 6 +279527=402 + 67 * 149 * 4 * 1 + 3 +56971=4 + 76 * 9 * 79 + 91 +447325=463 + 2 + 795 * 355 + 25 +841=81 * 9 + 97 + 2 + 13 +7319280640=61 * 45 * 7 + 709 * 7 * 656 * 80 +35412=6 * 724 + 1 + 9 * 8 + 580 +6453=161 * 1 + 475 + 81 * 9 +17854=3 + 32 * 69 + 42 * 7 + 655 +7614444=86 * 7 + 718 * 824 + 7 + 88 * 7 + 19 +393281=5 + 4 * 109 * 9 + 32 + 77 * 2 * 22 + 9 +1480=679 + 67 + 130 + 537 + 9 + 58 +11720991=1 * 8 * 23 * 7 * 364 + 5 * 5 * 5 + 59 + 7 +15899250=986 * 375 * 43 +80808=40 + 4 + 521 + 212 * 104 +5186813940000=504 * 967 * 5 * 825 * 5 * 86 * 2 * 3 +3883810560=6 + 88 * 2 * 8 + 4 * 438 + 8 * 980 * 6 +19738=5 * 2 + 508 * 38 + 54 +703764=13 + 8 * 48 + 495 + 20 * 77 + 23 * 6 +273920=7 + 629 + 987 + 89 * 8 * 20 +911=7 * 5 * 9 + 4 + 592 +33029=50 * 644 + 822 + 7 +524702=7 + 153 + 24 + 79 * 7 * 3 * 95 + 17 +35742400=8 * 1 * 706 + 7 + 51 * 174 * 6 * 6 + 9 + 7 +1483641=2 * 64 * 70 + 737 * 153 +7397=364 * 5 + 8 * 4 + 85 +1513454743=69 * 31 + 8 * 732 * 963 + 91 +87816030=47 * 1 * 7 * 80 + 3 * 8 * 1 + 6 * 417 * 1 +279602=759 * 1 * 23 * 4 * 4 + 274 + 9 + 7 +13426560=36 * 37 * 180 * 8 * 7 +69102877793=9 * 997 + 2 * 91 + 7 * 17 * 711 * 7 + 5 +1182849=2 + 249 * 31 * 38 * 4 + 129 + 8 +20198=8 * 6 + 3 * 396 + 2 +10386966=1 + 3 * 8 + 612 * 2 * 96 + 5 * 7 + 8 * 4 + 6 * 3 +245966149=96 * 3 * 146 + 5 + 6 * 4 + 2 * 2 + 3 * 731 +6523=4 * 61 * 26 + 151 + 28 +507242778=6 + 822 + 69 * 44 * 4 * 459 * 1 + 6 * 7 +4557=2 + 48 * 3 * 9 + 169 * 3 +6172533=37 + 9 + 207 * 43 + 7 * 9 * 7 + 7 + 12 * 9 +35178=1 * 682 + 81 * 46 + 80 +12418780=54 + 7 + 6 * 8 * 351 * 6 + 164 * 11 +37440=24 + 9 + 8 + 12 + 870 + 247 * 32 +42929=9 * 124 * 38 + 5 + 516 +728=567 + 6 + 23 + 42 + 90 +9778=9 + 173 + 39 + 15 + 5 + 3 * 39 + 262 +18714=89 + 265 + 5 * 13 * 4 + 43 * 1 + 3 +4136=12 * 289 + 668 +986=919 + 65 + 2 +382284584=655 + 1 * 7 + 1 * 144 * 578 + 7 + 1 +54736659=504 * 52 * 8 + 38 + 17 * 261 +8001=55 + 7 * 6 + 9 * 7 * 3 +2164=20 + 62 * 3 + 7 + 8 * 8 + 76 +34288954=174 * 227 + 512 + 141 * 854 +858002=715 * 600 * 1 * 2 + 2 +280258704=396 * 16 + 217 * 528 * 81 +2447=237 * 9 + 217 + 9 + 88 +21103892=688 + 2 * 139 * 4 + 3 + 64 * 55 + 7 +572320=571 + 889 * 7 * 8 * 7 +22940=74 * 1 * 31 * 10 +453933144=884 + 1 + 7 + 2 * 8 * 75 + 164 * 94 * 9 +628=2 + 96 + 5 * 6 + 10 +1806271=4 * 319 * 283 * 5 + 13 + 718 +57418552=8 + 96 * 4 * 18 * 9 * 6 + 4 * 142 +31091=2 + 94 + 6 + 323 * 9 + 4 + 4 + 53 * 8 + 3 +9551142=2 * 7 + 4 + 4 * 92 + 9 * 87 + 2 * 54 +368064=62 + 5 + 31 + 10 * 568 * 6 +356332=848 * 13 * 8 + 38 + 853 * 4 +6598799=541 + 2 * 674 + 617 * 6 + 5 * 3 + 1 + 1 +3430232=9 * 15 + 29 + 9 + 2 * 700 * 7 + 56 * 4 + 8 +4196=951 + 77 + 9 + 8 + 4 * 4 +24625387=9 + 6 * 8 * 6 + 9 + 37 * 846 * 38 + 3 + 8 + 8 +4318272002=10 * 7 * 2 * 3 * 80 * 6 * 5 * 2 * 7 * 306 + 2 +49392736=80 * 63 + 4 * 72 * 34 * 2 + 944 * 2 +314242938=77 * 30 * 223 + 22 * 610 + 218 +11952=76 + 23 + 69 + 7 + 50 + 439 * 18 +7579925=860 * 37 + 435 * 47 * 5 +33287=1 * 822 * 40 + 354 + 48 + 2 + 3 +126232779=6 * 3 + 841 * 9 * 5 * 4 + 77 * 8 * 34 + 9 * 3 +155627=1 * 6 * 99 + 989 + 54 * 95 + 13 + 99 +51571974=7 * 5 * 579 + 7 * 848 + 1 + 1 * 3 +20290=3 + 85 + 3 + 467 * 36 * 1 * 1 + 6 + 196 +2626=2 + 6 * 96 + 545 * 2 +22878=2 + 2 + 80 + 275 + 4 * 21 * 3 + 9 +575535=54 + 4 + 14 * 18 + 10 + 8 * 73 * 6 + 3 +1072=7 * 9 + 995 + 9 + 5 +3841=847 * 4 + 87 + 358 + 8 +343965=6 * 35 * 67 + 885 * 23 +227912=8 * 183 + 31 * 19 + 3 + 72 + 9 * 8 * 1 +5511886=749 + 92 * 63 + 2 + 9 + 4 * 104 + 94 +8817032=460 * 2 * 2 * 6 + 4 + 4 * 7 * 2 * 57 + 728 +236071=566 * 414 + 610 + 196 + 941 +1699=874 + 26 + 799 +9082=59 + 85 * 7 * 9 + 10 +494598=8 * 8 * 8 + 9 * 1 + 2 + 4 * 1 * 3 * 4 + 17 * 78 +443120=71 + 7 + 62 + 5 * 764 * 4 +799531202=320 * 693 + 332 * 72 * 50 + 2 +2975722=802 + 811 + 6 * 919 * 2 +1384=5 + 687 * 2 +1980=6 + 46 * 5 + 70 * 6 +1051=74 + 41 + 921 + 7 + 8 +7224=69 * 9 + 6 + 405 * 7 +100058717=58 * 44 + 628 * 7 * 145 * 31 + 9 + 8 +135606016=86 * 1 * 1 * 7 + 2 * 4 * 8 * 877 + 96 * 8 +188416=4 * 8 * 735 + 32 * 8 +19518=2 + 1 + 8 + 9 + 1 + 54 + 9 * 25 * 9 + 616 + 2 +31719=65 * 6 + 9 * 78 + 597 +246572=26 + 98 * 9 + 4 + 393 + 9 * 81 * 2 + 8 +7811=198 + 16 + 5 + 7 * 31 + 1 + 4 + 794 + 6 +7211685=411 * 5 * 7 + 562 + 8 + 554 * 93 * 5 +332644=63 * 1 * 8 * 660 + 4 +449841=8 * 6 * 3 + 1 + 9 * 9 * 4 + 9 + 608 * 73 + 88 +3162=88 + 4 + 6 + 9 + 7 + 3 + 53 + 7 + 9 * 17 +123780=961 + 528 + 514 + 51 + 9 * 60 +397=88 + 299 + 1 * 1 + 9 +5172=6 * 431 * 2 +7637=251 + 9 + 85 + 746 * 7 +1812=908 + 35 + 789 + 3 + 77 +1120=7 * 9 * 1 + 68 + 9 * 2 * 4 +770138283=11 * 6 * 57 * 1 + 3 * 8 * 947 * 9 * 1 * 3 + 3 +163644=610 + 32 + 344 + 63 * 156 +507=41 * 9 + 2 + 76 + 60 +282926819=6 + 4 * 827 + 26 * 812 * 42 + 3 + 32 +10600=2 * 1 + 8 * 8 * 6 + 6 + 8 * 3 + 91 + 541 + 6 * 5 +1123947090=49 + 3 * 877 * 8 * 1 + 323 * 9 * 342 +25775616=8 * 8 * 6 * 97 * 692 +243687944=650 * 5 * 815 + 32 * 92