From 29a9f321cd6dc4b561b2252b57a122d9a8cd91a2 Mon Sep 17 00:00:00 2001 From: Logiar Date: Thu, 5 Dec 2024 14:43:19 +0100 Subject: [PATCH] Removing inputs. --- .github/workflows/solve.yaml | 38 +- .gitignore | 2 + day01.kts | 2 +- day01input.txt | 1000 ------------------------ day02.kts | 2 +- day02input.txt | 1000 ------------------------ day03.kts | 2 +- day03input.txt | 6 - day04.kts | 2 +- day04input.txt | 140 ---- day05.kts | 2 +- day05input.txt | 1376 ---------------------------------- simpletest.sh | 45 +- 13 files changed, 83 insertions(+), 3534 deletions(-) create mode 100644 .gitignore delete mode 100644 day01input.txt delete mode 100644 day02input.txt delete mode 100644 day03input.txt delete mode 100644 day04input.txt delete mode 100644 day05input.txt diff --git a/.github/workflows/solve.yaml b/.github/workflows/solve.yaml index 80fa640..0123ffd 100644 --- a/.github/workflows/solve.yaml +++ b/.github/workflows/solve.yaml @@ -8,11 +8,37 @@ on: jobs: example-action: runs-on: ubuntu-latest + env: + DAY01INPUT: ${{ secrets.DAY01INPUT }} + DAY02INPUT: ${{ secrets.DAY02INPUT }} + DAY03INPUT: ${{ secrets.DAY03INPUT }} + DAY04INPUT: ${{ secrets.DAY04INPUT }} + DAY05INPUT: ${{ secrets.DAY05INPUT }} + DAY06INPUT: ${{ secrets.DAY06INPUT }} + DAY07INPUT: ${{ secrets.DAY07INPUT }} + DAY08INPUT: ${{ secrets.DAY08INPUT }} + DAY09INPUT: ${{ secrets.DAY09INPUT }} + DAY10INPUT: ${{ secrets.DAY10INPUT }} + DAY11INPUT: ${{ secrets.DAY11INPUT }} + DAY12INPUT: ${{ secrets.DAY12INPUT }} + DAY13INPUT: ${{ secrets.DAY13INPUT }} + DAY14INPUT: ${{ secrets.DAY14INPUT }} + DAY15INPUT: ${{ secrets.DAY15INPUT }} + DAY16INPUT: ${{ secrets.DAY16INPUT }} + DAY17INPUT: ${{ secrets.DAY17INPUT }} + DAY18INPUT: ${{ secrets.DAY18INPUT }} + DAY19INPUT: ${{ secrets.DAY19INPUT }} + DAY20INPUT: ${{ secrets.DAY20INPUT }} + DAY21INPUT: ${{ secrets.DAY21INPUT }} + DAY22INPUT: ${{ secrets.DAY22INPUT }} + DAY23INPUT: ${{ secrets.DAY23INPUT }} + DAY24INPUT: ${{ secrets.DAY24INPUT }} + DAY25INPUT: ${{ secrets.DAY25INPUT }} steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: - distribution: 'corretto' # See 'Supported distributions' for available options + distribution: 'corretto' java-version: '21' - uses: https://github.com/fwilhe2/setup-kotlin@main - name: Run tests @@ -21,8 +47,14 @@ jobs: run: | set -e for script in $(ls *.kts | sort -r); do - echo "Running $script" | tee -a solutions-output.txt - kotlin $script 2>&1 | tee -a solutions-output.txt + dayname=$(basename $script .kts | tr 'a-z' 'A-Z')INPUT + input_var="${!dayname}" + if [ -z "$input_var" ]; then + echo "Skipping $script: No input found for $dayname" | tee -a solutions-output.txt + continue + fi + echo "Running $script with input from $dayname" | tee -a solutions-output.txt + echo "$input_var" | kotlin $script 2>&1 | tee -a solutions-output.txt done - name: Upload Solutions Output uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..885b635 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*input.txt \ No newline at end of file diff --git a/day01.kts b/day01.kts index 6e0b093..4cff76a 100755 --- a/day01.kts +++ b/day01.kts @@ -3,7 +3,7 @@ import java.io.File import java.util.Scanner import kotlin.math.abs -val scanner = Scanner(File("day01input.txt")) +val scanner = Scanner(System.`in`) val firstList = mutableListOf() val secondList = mutableListOf() var secondMap = mutableMapOf() diff --git a/day01input.txt b/day01input.txt deleted file mode 100644 index 6192278..0000000 --- a/day01input.txt +++ /dev/null @@ -1,1000 +0,0 @@ -28186 35627 -51854 34597 -19211 51032 -79370 53096 -68126 40302 -43284 25771 -80565 99650 -83151 70796 -91092 74579 -70740 98650 -45166 53096 -24309 45165 -62950 26641 -23291 91017 -56683 53851 -22308 81625 -83150 34155 -87443 91017 -56834 91784 -35159 67595 -10722 83450 -92257 23419 -15995 96671 -89901 39216 -25104 76669 -37075 56652 -15874 66083 -33493 35627 -87420 31838 -11269 91386 -92604 83450 -34888 99650 -49759 40926 -38211 27379 -93866 22096 -88205 66217 -55772 60776 -83556 78255 -22292 50829 -22487 78358 -27260 79702 -74570 90319 -27532 14353 -40720 67595 -99885 65688 -25733 53752 -12466 14411 -88402 40165 -63328 13804 -45165 62461 -24913 94225 -32251 76669 -91004 40165 -48939 45165 -98082 34561 -74569 42932 -99641 54600 -42748 22021 -23376 54490 -38706 69865 -64985 87783 -14431 78715 -37671 94814 -27425 60776 -21801 76669 -96975 33493 -56680 31838 -41265 71129 -99081 32487 -53077 82615 -54490 55624 -22649 60776 -82601 25943 -93133 96412 -77182 78358 -67827 76838 -45976 89107 -20352 89034 -28891 23800 -87739 76669 -47802 99650 -18060 28437 -65882 93980 -53343 13764 -84301 93604 -62547 93479 -79067 45165 -70139 54490 -28158 76669 -71631 39775 -36521 57540 -78928 37888 -75943 39076 -28462 60107 -95828 94225 -49768 73181 -40545 97945 -18963 74260 -17934 63046 -73054 13454 -43170 60924 -90257 28180 -99765 33493 -41380 50296 -24225 62945 -66579 73961 -73361 54622 -26339 91017 -84080 62041 -89322 54600 -84610 18344 -58420 87051 -12253 83450 -25631 91017 -71764 63533 -52908 40165 -56578 46636 -99876 61946 -43934 64469 -78242 11111 -97629 28916 -21477 91017 -97639 64456 -90978 53077 -94412 73836 -49249 96113 -92750 14411 -12961 13764 -84319 22230 -83435 78146 -48951 86109 -40258 13764 -54600 65577 -51432 53096 -11527 20394 -68196 94225 -14939 91017 -13158 39216 -62120 93587 -20939 71764 -58436 28038 -37198 31838 -59152 17554 -52958 44145 -64236 18285 -63763 56578 -40304 99650 -86564 78910 -45684 52760 -43139 61946 -99974 76669 -44698 86004 -19940 22021 -29106 78358 -60431 91386 -50880 76451 -96595 42193 -40966 73961 -64515 61946 -31081 39834 -87614 70892 -82663 54622 -73537 62994 -14125 56652 -51361 35627 -26084 35817 -82915 20069 -72409 22021 -22834 20071 -93476 83787 -63719 53096 -41505 48056 -56055 20404 -37255 99650 -33468 60776 -70472 22598 -66290 53077 -91071 67595 -30888 33173 -60826 29871 -12334 78358 -62744 69424 -85449 79500 -22333 16295 -67621 18455 -12605 90059 -32490 25835 -96639 75870 -82412 39747 -76964 60153 -60776 60776 -68837 39216 -35635 67595 -85239 14964 -15278 83450 -63581 35178 -77006 18285 -88570 80424 -61499 81689 -57466 47392 -78524 84304 -11821 53989 -62425 28916 -36264 50872 -38567 13061 -16357 45165 -17202 94451 -64290 31838 -76075 55071 -87325 40165 -93961 99650 -49866 65601 -91725 14411 -44721 18285 -44065 33493 -22521 56578 -28070 54600 -45621 54600 -54677 26913 -79647 24298 -89613 31415 -86493 13764 -16243 64218 -12832 21187 -43847 35189 -75859 54600 -69276 75826 -43251 14411 -96012 41446 -35482 35817 -45380 82383 -66801 31838 -79199 92341 -33087 70511 -40619 28916 -67655 80670 -22431 60776 -62731 54622 -29873 25771 -99354 63481 -36415 61946 -29742 94919 -64872 53077 -93028 55635 -32784 18285 -87488 68734 -56652 18285 -49968 80712 -82653 53096 -30377 24784 -40120 45165 -88404 70120 -69179 45165 -99645 67595 -44883 45165 -76320 43595 -29057 90019 -28502 61946 -73459 84304 -96354 54622 -77589 14301 -51381 54490 -40490 95808 -36023 27135 -13434 63807 -27250 35627 -13764 32845 -28229 34954 -56430 76669 -98593 63811 -11192 60776 -81601 72265 -86908 77116 -25484 82383 -31115 42206 -75124 70148 -96785 53096 -59814 85995 -17024 57255 -81701 41971 -43938 33493 -91646 33599 -96616 81828 -73270 87775 -75876 35817 -53007 83450 -39527 33975 -35936 17039 -95194 23302 -96876 80147 -68136 91386 -31253 19760 -98767 61208 -98353 86604 -13239 36264 -43374 13764 -36658 22965 -58030 84304 -42686 78358 -99419 49423 -43976 20759 -33361 47852 -23794 61946 -26896 83450 -12213 37740 -53827 49270 -71874 61946 -19394 77889 -63728 81025 -63780 72467 -34161 21317 -81832 56652 -20986 99650 -36631 48302 -60232 63009 -37744 84304 -46964 39391 -19771 14411 -75783 69365 -71727 71252 -60541 69095 -68594 30949 -51619 88697 -26797 50216 -86654 61946 -98872 53347 -20079 18807 -60408 41952 -37203 47862 -92078 43717 -94853 53096 -91937 65490 -39800 79198 -14179 50429 -21846 72768 -19081 14411 -60170 39838 -14482 36264 -61946 64811 -88464 10899 -93401 44867 -42260 53495 -92730 76838 -17708 31838 -68523 99650 -44540 95629 -12785 54490 -34598 13764 -20161 28916 -15318 67595 -67423 47864 -13951 95495 -63011 67595 -73505 61946 -22300 73685 -35181 78358 -70531 60776 -95954 57049 -65463 67851 -67270 53593 -62726 13782 -66690 72865 -99591 33493 -89300 13764 -82383 51267 -55326 56578 -66315 54622 -51554 91145 -21778 67595 -38569 71437 -25915 80353 -92411 88336 -76148 83204 -68688 61443 -78063 34003 -27804 14411 -79316 59050 -14222 22021 -83018 18197 -36304 33795 -46381 78358 -23167 99650 -73696 11314 -83569 71391 -93902 76551 -33606 35906 -30257 54600 -24956 80860 -64619 14411 -17640 56652 -22908 83696 -18954 74347 -89497 83450 -70303 76669 -37979 69814 -22661 53077 -96573 83961 -13055 85059 -73265 67595 -31927 45165 -61607 54490 -62232 53096 -68738 79113 -50586 95006 -55731 39122 -33386 31838 -20118 97657 -98794 76669 -62869 57813 -45508 91386 -29960 56652 -20228 95663 -75424 74090 -75421 30158 -82307 11086 -26488 64910 -48430 41174 -81439 63107 -68896 56652 -67511 33375 -40446 66170 -13668 68369 -83234 16181 -16929 84304 -42735 85915 -93954 22403 -98252 33493 -39418 54622 -14183 89745 -67167 68002 -88731 22021 -42317 54490 -29404 83450 -80844 31838 -43255 34866 -61762 32538 -32255 78358 -93152 25771 -42141 56578 -83740 22021 -40030 47353 -34668 14411 -46752 21905 -26196 48915 -45243 67595 -26757 56652 -13969 82383 -13148 84304 -39362 29711 -92819 31171 -12210 14411 -58671 91017 -87279 62713 -97755 92124 -77086 62944 -87094 40099 -83398 35817 -36525 64734 -27346 36264 -50274 17587 -74438 92593 -86182 13764 -63946 56578 -99269 25771 -46815 67595 -44645 93146 -82027 25771 -46981 39216 -52039 31814 -25930 54600 -48743 31838 -80123 72281 -21790 84579 -91556 78358 -63961 14411 -11280 97891 -67372 60776 -35817 34731 -80767 53877 -32458 90108 -53471 13557 -76699 92723 -33967 31838 -83166 23325 -48974 44826 -28408 16412 -18980 61946 -76595 21581 -54278 82835 -57836 67595 -16791 84304 -52746 99650 -23543 83450 -28819 95078 -21590 84304 -90588 91017 -62879 43669 -35788 81389 -67595 91386 -43342 73961 -34072 73961 -41533 54487 -77769 71151 -95215 74006 -37630 44436 -85291 18292 -82845 99650 -56633 60776 -95645 54490 -59689 14411 -77873 23174 -47892 94225 -71442 77808 -52932 56578 -68699 56652 -70296 54600 -34780 50848 -14008 63408 -65865 73961 -64689 84695 -70986 45490 -20034 54600 -21194 73961 -42510 37716 -80906 32357 -38289 19304 -44371 53386 -45873 95639 -72359 53096 -26200 40165 -81093 32591 -75520 99689 -70526 92020 -38000 90543 -42109 40526 -65858 64811 -77533 83450 -84191 63489 -59480 46311 -20750 32879 -81791 76258 -49948 56739 -44960 22021 -49084 12978 -46948 25438 -22467 39216 -32066 41311 -47715 13764 -40689 56652 -81797 82792 -48102 91114 -13286 64910 -24324 81079 -14772 91386 -10721 20481 -26990 54622 -67169 22021 -42848 25771 -24672 13764 -86122 25771 -56904 13764 -81436 53096 -94624 33493 -91853 56652 -23675 14088 -26625 68877 -22777 53096 -44833 33493 -47549 96449 -79529 27951 -78188 99650 -16287 51001 -64231 25771 -84131 55907 -15378 41016 -69506 78358 -80392 64811 -68681 57430 -95565 40165 -27128 40839 -11911 38020 -32463 95974 -64051 39216 -59409 25771 -85311 99650 -15025 76669 -31085 83450 -57046 43589 -31356 25944 -53445 32566 -65374 24456 -94347 17250 -51998 76838 -38930 76838 -13223 22328 -23412 33493 -33498 39216 -66922 97888 -19340 13764 -30800 33625 -63834 53077 -26329 76669 -36202 52321 -99460 87180 -10752 22155 -83677 54586 -83136 94225 -43505 94775 -49792 51024 -18430 87697 -48959 62169 -27559 86092 -42055 71266 -47346 27875 -95130 15327 -67175 50520 -80717 48669 -98758 93010 -69621 73606 -25596 22021 -37015 83450 -14944 93706 -70867 84304 -14464 80652 -11365 25771 -78435 46797 -45002 58808 -57900 83487 -99650 55843 -80681 38011 -64811 86071 -97586 33898 -42094 41087 -76669 54622 -74600 28060 -18109 25771 -95834 40165 -76583 32274 -23271 54600 -73123 81744 -81442 70437 -97274 25771 -99106 91717 -19847 39216 -41705 54622 -97824 64338 -34982 39216 -47246 58999 -94716 78358 -52266 60776 -39216 95154 -49351 94864 -64910 39559 -43455 84248 -71500 27152 -30651 49103 -63267 44712 -17567 18998 -63046 48579 -51483 63529 -35182 14411 -73961 60776 -39993 30182 -26258 96243 -52698 77762 -21525 22021 -47513 20331 -13140 22021 -43778 40165 -22788 94225 -84367 31838 -54265 64910 -55305 42377 -78923 54586 -40429 39216 -12422 63046 -24878 94225 -64356 57593 -34812 40889 -54661 60776 -31004 55132 -38061 63046 -85827 35627 -72862 33704 -51636 98691 -15448 54159 -90048 67595 -53851 18285 -48530 74924 -20386 81637 -87273 53096 -83022 56018 -98251 65250 -89295 60776 -98142 15765 -31571 42354 -92874 70979 -44965 58401 -51688 78358 -93890 12104 -65530 53096 -55006 91017 -49672 55977 -31815 37826 -13567 58321 -60844 53077 -63845 26325 -98712 79314 -99601 63236 -14173 60776 -11249 86708 -37023 48603 -25248 14411 -25444 63817 -92822 10083 -43060 41903 -98283 89972 -10004 77190 -69379 56652 -30459 45165 -81481 18285 -47130 24016 -57377 56872 -24043 63046 -78319 33493 -96058 33493 -42928 32466 -76838 35627 -43659 76669 -36827 39216 -41007 60776 -79655 14411 -26608 44836 -85420 68185 -81174 96069 -79223 59880 -54106 52192 -71917 83450 -19775 73961 -45391 66102 -26838 33493 -53437 76669 -71922 91017 -67552 40770 -23842 12889 -75398 90858 -20264 96094 -38278 39216 -62780 68287 -92766 45165 -25677 23355 -55791 83450 -63556 93703 -97511 61946 -74712 18285 -34605 15067 -57436 56652 -91202 91017 -11656 54622 -31838 22156 -94443 25771 -84090 60590 -63298 91386 -60339 56419 -25780 53096 -55284 76669 -83080 71920 -53843 36881 -83616 42743 -89091 68085 -71899 31838 -57786 67595 -34559 96506 -77211 94225 -67812 61946 -26511 63739 -51963 97847 -81350 23053 -37978 57093 -93413 89804 -38133 60776 -73234 84629 -60624 31957 -13937 34269 -35804 44626 -36210 53096 -34190 33493 -30736 83057 -80091 23762 -60917 82383 -30227 53096 -94439 56652 -78308 67595 -51009 67595 -64010 53077 -20563 61946 -43967 17312 -86436 75180 -80389 42825 -94453 83450 -41805 91918 -21462 99650 -71157 10537 -35046 73961 -96103 74733 -83069 35732 -18285 82383 -26446 76669 -70874 18579 -10539 11666 -57999 83450 -25966 91017 -37570 93089 -46126 18897 -65025 78341 -48404 61946 -26116 91017 -84857 33493 -84369 96112 -79609 76561 -24415 76669 -55288 37007 -85869 10010 -15152 76669 -10609 52954 -56293 59754 -35563 99650 -15144 32125 -27560 33493 -10484 99261 -73264 74795 -44774 17094 -41294 53851 -14411 83990 -17065 25771 -25771 60026 -58907 16393 -93527 90760 -25715 68223 -61620 23456 -36485 15169 -70191 39216 -40165 94225 -54006 99650 -75597 53096 -49678 25771 -51574 96842 -57852 18285 -60104 61946 -78607 35627 -54889 14411 -47241 10303 -71456 94225 -81425 49149 -59061 28602 -24633 31838 -14420 93613 -54622 53077 -17040 78745 -70622 88133 -56992 72730 -97895 33493 -94648 44310 -59138 13764 -97350 69918 -32734 83579 -55320 66823 -96915 55216 -95293 38588 -13774 12822 -70053 58437 -22021 18724 -41216 43315 -28987 31838 -70488 89770 -48277 53914 -79376 76669 -94225 53077 -60803 12578 -21144 16837 -23645 33714 -28916 83751 -50535 31838 -62178 64811 -63126 71848 -33569 46461 -99826 53077 -74714 33856 -67967 26838 -83610 54622 -15872 36009 -34302 31838 -24069 56292 -90147 38554 -95987 79195 -62656 40165 -83153 26094 -68726 85767 -63172 74949 -35390 94225 -29379 63046 -13571 56578 -16169 64811 -68905 35817 -71763 53096 -48781 28841 -95966 15028 -87862 67072 -87176 60776 -11203 13761 -50294 11171 -21503 25547 -96570 78358 -25213 84422 -61744 85120 -62795 72393 -84907 33493 -82935 84304 -24224 36264 -91386 99650 -76217 98074 -73872 60776 -41777 19177 -95695 39216 -88779 15111 -93458 67595 -74732 67770 -23754 39216 -90662 35817 -24013 99650 -66779 83450 -54586 27524 -88285 69874 -47809 22021 -25662 71764 -31583 56652 -58156 60776 -22656 56578 -22315 76174 -70195 54622 -27027 33351 -32409 75991 -91017 72493 -53096 13301 -92656 41863 -84304 85568 -45081 73961 -21844 78358 -83024 61946 -93888 45113 -69174 53096 -98465 56543 -46208 56652 -63289 99650 -96607 76329 -62648 55561 -38090 62481 -87491 90246 -45019 81753 -88050 73961 -18142 26270 -36682 22021 -15933 94225 -17393 38533 -33633 67595 -55662 73961 -63567 74739 -69557 83450 -36169 25771 -40716 35837 -11665 14704 -94437 36515 -43859 18285 -98937 54490 -73932 94209 -99289 50655 -12403 22021 -80283 64811 -68700 43336 -36887 69617 -53551 83450 -76290 18285 -49743 25771 -35627 76669 -59070 13231 -40419 24169 -48544 82383 -68680 84304 -31610 58761 -31170 67595 -27004 41596 -62727 98757 -24189 76875 -42807 97581 -85552 71764 -52402 40046 -78358 41164 -83450 76669 -62947 25771 -55820 53096 diff --git a/day02.kts b/day02.kts index 094a90d..a8ae109 100755 --- a/day02.kts +++ b/day02.kts @@ -3,7 +3,7 @@ import java.io.File import java.util.Scanner import kotlin.math.abs -val scanner = Scanner(File("day02input.txt")) +val scanner = Scanner(System.`in`) var safelines = 0 var dampenedsafelines = 0 while (scanner.hasNextLine()) { diff --git a/day02input.txt b/day02input.txt deleted file mode 100644 index f9a38d0..0000000 --- a/day02input.txt +++ /dev/null @@ -1,1000 +0,0 @@ -8 11 14 16 15 -23 25 27 30 30 -19 20 21 22 23 25 26 30 -16 19 22 25 26 28 35 -59 61 59 61 63 -23 25 22 23 22 -5 8 9 12 11 14 15 15 -87 90 91 92 89 91 95 -36 38 40 43 40 41 47 -37 40 40 42 45 48 49 52 -40 41 41 43 45 43 -32 34 36 36 38 40 40 -2 4 6 6 7 11 -1 2 5 5 7 12 -76 79 81 85 88 -34 37 38 40 42 46 43 -33 34 35 39 39 -66 67 70 74 77 81 -77 80 84 85 86 87 89 96 -29 31 34 40 42 45 47 48 -30 32 34 36 39 46 47 44 -37 39 42 49 50 50 -76 78 80 83 85 86 93 97 -56 57 58 65 68 75 -43 40 41 44 45 46 48 51 -35 33 34 37 38 36 -68 67 70 73 76 76 -87 86 87 89 92 96 -19 18 21 24 26 27 34 -80 78 79 81 78 81 -47 44 42 44 45 44 -27 26 28 31 28 28 -89 88 91 88 90 92 93 97 -64 63 66 63 66 68 74 -40 39 40 43 43 46 49 -43 41 41 44 42 -56 55 58 61 61 62 63 63 -48 45 45 48 50 53 57 -35 33 36 39 39 45 -67 65 68 72 75 76 78 79 -32 29 30 34 37 40 43 40 -66 64 68 71 72 72 -78 75 78 79 83 84 87 91 -11 8 12 13 20 -73 70 72 75 77 78 83 86 -59 56 61 63 61 -60 58 59 60 61 66 66 -76 75 80 82 86 -64 63 70 72 75 80 -2 2 4 5 7 9 -64 64 66 69 72 75 73 -45 45 47 48 49 51 51 -64 64 65 67 69 71 75 -77 77 79 81 84 91 -77 77 76 77 78 80 -43 43 45 46 43 44 47 46 -57 57 59 57 57 -9 9 12 9 11 14 18 -69 69 70 71 72 71 74 81 -50 50 53 54 54 57 -31 31 34 34 35 37 38 35 -10 10 12 15 16 19 19 19 -64 64 65 65 66 70 -49 49 51 51 58 -20 20 22 26 28 -75 75 79 80 81 84 83 -63 63 67 70 72 74 76 76 -86 86 87 90 94 98 -33 33 35 39 42 44 49 -70 70 73 79 80 -65 65 66 73 75 78 79 78 -85 85 90 91 94 94 -31 31 38 39 42 45 49 -22 22 25 32 34 35 40 -8 12 14 15 17 18 20 21 -33 37 38 39 38 -34 38 40 42 43 44 44 -49 53 54 57 61 -30 34 36 38 41 47 -79 83 84 81 83 -90 94 93 95 93 -88 92 94 95 94 94 -18 22 25 23 25 28 32 -71 75 74 75 82 -80 84 87 87 88 91 92 -45 49 51 51 52 50 -40 44 45 48 48 49 49 -21 25 27 29 29 33 -25 29 30 31 31 33 38 -49 53 57 58 61 -70 74 75 79 82 80 -64 68 72 73 74 76 76 -50 54 55 56 58 61 65 69 -59 63 64 66 68 72 73 80 -70 74 77 78 79 84 87 -12 16 23 25 26 24 -8 12 13 16 22 23 24 24 -11 15 18 19 21 23 29 33 -69 73 76 77 82 85 92 -10 16 17 20 23 -11 18 19 22 25 26 25 -45 51 54 55 55 -19 25 27 30 31 32 33 37 -20 27 30 31 33 35 38 43 -87 93 96 94 96 -79 84 87 88 89 87 86 -38 44 43 45 47 49 52 52 -25 30 31 29 33 -18 25 27 28 26 31 -25 30 30 33 34 -8 15 17 20 20 17 -24 29 31 31 31 -20 27 30 30 34 -55 62 63 66 66 72 -2 8 11 14 18 21 23 24 -33 39 43 46 48 50 51 48 -22 29 30 34 34 -79 84 88 90 93 95 99 -61 66 70 72 74 81 -34 40 41 44 45 46 52 54 -68 73 74 79 77 -21 28 35 37 40 40 -47 53 59 60 64 -57 62 63 66 71 78 -14 12 9 6 4 3 5 -46 44 43 42 40 37 37 -76 75 72 71 68 64 -54 53 52 51 45 -69 68 71 69 68 -64 63 64 63 60 58 56 58 -77 76 75 76 76 -17 16 17 16 13 11 7 -38 37 34 35 28 -60 58 58 55 52 -70 67 64 61 61 59 62 -95 93 91 90 89 89 89 -72 71 69 66 66 62 -81 80 80 77 74 73 72 67 -16 13 12 8 7 6 5 -25 24 21 19 17 15 11 14 -19 18 14 12 12 -66 65 64 63 59 55 -34 31 27 24 21 18 11 -99 96 94 87 84 -46 43 41 34 33 35 -14 11 9 2 2 -57 55 48 45 43 41 38 34 -69 66 64 61 55 53 46 -69 70 69 66 63 60 58 -61 62 60 59 58 55 54 57 -69 70 67 64 63 61 61 -29 31 30 27 26 25 22 18 -63 65 62 59 57 54 47 -31 33 32 33 31 29 -94 95 92 89 91 94 -45 46 45 42 40 41 41 -70 71 68 66 63 65 61 -94 95 94 96 93 92 90 84 -10 12 12 9 7 4 2 -33 35 35 32 29 30 -74 77 74 74 74 -32 34 34 32 28 -72 73 73 72 69 64 -59 60 58 57 53 50 47 -79 82 79 75 74 73 75 -38 41 39 38 37 36 32 32 -74 75 73 69 65 -43 44 40 39 33 -52 55 54 52 45 42 40 37 -28 29 24 21 20 21 -50 52 51 50 47 46 40 40 -15 17 10 9 7 3 -21 23 16 15 9 -39 39 36 35 32 -95 95 93 90 87 90 -49 49 46 43 42 42 -29 29 28 26 22 -31 31 30 27 25 22 15 -15 15 13 12 14 11 10 -77 77 76 79 77 75 78 -42 42 41 42 39 38 35 35 -7 7 8 6 2 -96 96 94 91 92 90 84 -73 73 73 72 71 -57 57 56 56 53 51 49 52 -87 87 84 82 81 81 79 79 -38 38 35 33 31 28 28 24 -62 62 62 60 55 -35 35 32 31 27 26 -78 78 75 72 71 67 66 69 -47 47 44 40 40 -72 72 71 69 67 63 61 57 -48 48 46 42 35 -65 65 60 58 56 55 54 -92 92 89 87 86 81 83 -66 66 64 61 58 52 52 -29 29 26 25 23 22 17 13 -47 47 42 40 33 -50 46 43 41 39 38 35 34 -39 35 34 32 30 27 28 -21 17 16 15 12 10 9 9 -71 67 66 65 61 -38 34 31 29 28 22 -87 83 80 81 78 -94 90 92 90 91 -83 79 78 75 78 75 75 -36 32 35 33 30 29 27 23 -87 83 84 82 76 -77 73 70 69 69 68 66 63 -94 90 89 87 87 85 86 -63 59 58 57 54 51 51 51 -32 28 28 27 23 -36 32 31 29 29 28 23 -42 38 34 31 29 28 -33 29 27 25 21 18 20 -29 25 24 21 17 16 13 13 -90 86 85 82 78 74 -68 64 62 58 56 51 -73 69 66 61 58 56 -93 89 87 85 82 75 72 74 -80 76 73 72 69 68 62 62 -40 36 34 32 30 25 24 20 -55 51 50 48 46 40 39 33 -25 20 19 18 17 14 -98 91 89 87 86 84 82 83 -58 52 51 49 49 -75 70 69 67 65 61 -91 84 83 82 80 78 76 69 -37 30 32 30 28 26 23 22 -48 42 40 42 41 39 40 -75 69 68 67 66 64 67 67 -90 85 86 85 83 82 79 75 -34 29 32 30 24 -93 87 86 84 83 83 82 -94 87 84 83 83 86 -19 14 14 13 12 12 -94 89 87 87 84 80 -60 53 50 47 44 44 37 -41 34 31 27 24 21 -31 25 23 19 20 -79 74 72 68 67 66 63 63 -28 23 21 20 19 17 13 9 -97 91 87 85 82 80 73 -96 91 88 86 81 78 75 72 -58 51 48 41 38 40 -35 28 25 22 16 13 13 -45 40 35 34 30 -38 33 30 23 21 14 -18 20 22 25 27 28 25 -78 80 82 83 86 89 90 90 -1 3 6 9 13 -21 24 25 28 30 31 33 39 -90 91 93 92 94 -47 49 52 50 51 54 56 54 -25 28 30 33 34 33 33 -20 21 24 25 26 27 25 29 -77 78 77 79 84 -64 67 68 71 72 72 75 -13 15 18 21 21 19 -33 35 37 37 38 38 -15 17 20 22 23 26 26 30 -56 57 58 58 64 -20 21 24 28 29 31 -41 43 47 50 49 -83 86 90 93 93 -8 11 15 18 20 24 -83 84 88 90 92 99 -54 55 58 59 65 68 -60 62 63 69 70 71 70 -57 58 65 67 70 70 -54 55 62 64 67 70 74 -17 18 19 21 24 30 32 38 -30 29 31 34 35 37 39 -27 24 25 26 27 30 29 -9 6 8 10 11 14 17 17 -32 31 32 35 37 41 -58 55 57 59 60 65 -25 22 25 26 25 27 30 32 -73 72 74 76 79 81 79 77 -5 2 5 8 10 12 10 10 -87 85 87 90 91 93 90 94 -38 37 38 40 41 42 39 45 -37 35 37 40 40 41 -14 11 11 14 16 18 16 -71 68 71 71 71 -29 26 26 29 30 33 37 -69 68 68 71 74 76 79 85 -43 40 44 46 47 48 50 -46 45 47 48 50 54 57 55 -23 22 26 29 29 -36 34 36 40 42 43 47 -13 10 12 16 18 19 25 -64 63 66 67 68 75 76 78 -72 70 75 77 79 80 77 -12 10 11 16 19 19 -64 62 64 69 70 73 75 79 -50 48 51 54 61 64 66 71 -12 12 14 16 18 -40 40 42 45 47 50 49 -62 62 65 67 67 -70 70 72 74 78 -10 10 11 12 13 14 15 20 -77 77 74 75 77 -40 40 38 39 38 -86 86 87 85 85 -48 48 49 46 50 -7 7 10 7 8 13 -19 19 20 20 21 24 -20 20 23 26 27 27 26 -40 40 42 45 46 46 46 -88 88 90 90 91 95 -65 65 65 67 69 76 -81 81 83 87 88 90 -48 48 49 51 55 57 54 -35 35 39 42 44 45 48 48 -70 70 73 75 78 79 83 87 -5 5 9 12 17 -10 10 11 12 15 21 22 -30 30 37 38 39 42 41 -77 77 82 84 87 90 93 93 -11 11 13 20 24 -59 59 61 66 71 -12 16 17 20 22 24 25 -52 56 57 59 61 62 64 61 -79 83 86 88 91 91 -16 20 21 23 27 -72 76 79 82 84 89 -85 89 86 87 89 -92 96 98 96 94 -32 36 37 34 35 37 38 38 -56 60 61 58 61 62 65 69 -78 82 80 81 87 -47 51 53 54 57 59 59 61 -53 57 57 59 60 62 60 -73 77 77 80 81 81 -83 87 88 89 90 90 94 -78 82 85 86 86 93 -37 41 42 43 46 48 52 53 -71 75 76 77 81 83 84 82 -78 82 86 88 91 91 -20 24 27 29 33 37 -54 58 59 61 64 65 69 76 -52 56 59 60 62 69 71 -8 12 14 19 18 -52 56 59 62 67 67 -69 73 74 79 83 -48 52 54 56 57 59 64 69 -84 91 92 93 95 -43 48 50 52 54 51 -76 81 83 85 88 90 90 -18 25 28 30 31 34 38 -49 55 58 61 63 68 -26 33 30 32 34 36 39 -10 17 14 17 15 -80 87 88 85 85 -81 88 91 89 90 93 97 -24 29 32 30 35 -41 47 50 51 54 54 57 58 -60 65 66 68 71 73 73 70 -33 40 40 41 43 45 47 47 -45 50 52 55 55 59 -1 7 10 11 12 12 19 -30 36 39 43 44 -51 58 61 65 63 -24 30 31 32 36 38 38 -46 53 57 59 63 -34 39 40 41 45 46 49 56 -33 38 39 40 41 46 49 -63 69 74 75 74 -74 81 88 91 93 95 95 -26 32 38 41 45 -67 72 79 81 83 86 93 -30 28 27 25 23 21 18 21 -43 40 38 36 33 30 30 -55 52 51 49 48 47 46 42 -21 20 17 16 10 -68 67 69 66 65 -38 35 33 31 33 31 29 32 -85 82 80 79 80 79 76 76 -64 63 66 64 61 57 -42 39 37 34 36 33 32 26 -42 40 37 37 34 31 30 -17 15 15 13 11 10 9 12 -75 73 72 72 72 -50 49 49 47 43 -53 50 47 45 45 38 -61 60 59 58 54 51 -37 36 32 29 30 -15 12 10 6 6 -44 43 42 38 34 -34 32 28 27 21 -24 22 19 18 15 9 8 -60 58 51 50 48 47 46 48 -91 90 88 85 78 76 76 -88 86 81 79 77 73 -89 88 86 84 78 72 -17 18 15 13 12 10 -77 80 78 77 75 78 -44 47 45 44 41 39 39 -14 17 16 13 10 8 4 -90 91 89 87 84 83 76 -51 52 49 52 49 46 45 -30 32 35 32 29 28 29 -15 16 15 16 16 -96 98 99 98 97 93 -83 84 82 81 79 78 81 76 -30 33 30 29 28 28 27 -41 44 42 42 39 36 33 36 -79 82 81 81 81 -48 50 47 47 43 -31 33 33 31 28 27 26 19 -49 50 47 46 42 40 39 -19 21 19 18 15 11 9 10 -52 53 51 49 48 44 42 42 -72 75 71 69 65 -25 27 25 23 22 18 15 9 -35 36 33 30 25 22 19 -76 78 75 73 68 65 68 -96 99 93 91 89 87 84 84 -80 83 82 79 76 69 65 -91 93 90 89 84 77 -78 78 77 74 71 -42 42 41 39 36 35 36 -81 81 80 77 75 74 71 71 -47 47 46 44 42 38 -71 71 68 66 64 61 55 -29 29 26 29 28 25 -76 76 77 74 71 74 -79 79 81 78 77 77 -79 79 76 79 76 75 74 70 -73 73 72 70 69 68 71 66 -59 59 58 55 53 52 52 50 -58 58 56 56 53 51 52 -80 80 79 77 76 76 73 73 -51 51 50 48 48 44 -41 41 41 38 37 36 35 29 -54 54 53 52 48 46 43 40 -25 25 23 19 20 -10 10 9 5 5 -63 63 59 57 55 52 48 -62 62 60 56 53 51 48 42 -40 40 39 37 35 30 29 -38 38 35 34 28 26 28 -90 90 85 84 84 -84 84 81 75 72 68 -76 76 73 68 67 64 59 -37 33 31 29 26 25 23 -88 84 83 80 77 80 -97 93 91 89 88 88 -82 78 77 74 73 70 67 63 -92 88 86 85 84 79 -20 16 14 16 15 -26 22 24 23 22 21 19 21 -57 53 55 54 53 51 51 -24 20 19 21 18 16 12 -56 52 50 49 48 49 46 40 -71 67 67 65 64 62 60 -40 36 36 33 31 29 31 -87 83 80 80 80 -25 21 19 19 17 14 10 -88 84 82 79 77 77 74 67 -23 19 15 14 11 10 -29 25 22 18 16 13 15 -43 39 36 32 32 -90 86 85 82 80 76 74 70 -58 54 50 47 40 -54 50 44 41 38 36 -98 94 88 85 88 -22 18 12 9 8 8 -49 45 38 36 33 29 -56 52 49 47 46 40 39 32 -53 48 47 45 42 41 38 -60 54 53 51 50 49 50 -90 83 82 81 81 -87 81 80 78 74 -25 19 18 16 13 6 -70 64 63 66 64 61 -36 29 26 29 30 -30 25 28 25 23 21 18 18 -81 76 78 76 74 73 69 -73 68 66 64 62 64 63 57 -51 46 46 44 41 -18 12 10 9 7 6 6 7 -38 31 30 30 28 26 24 24 -52 47 44 41 39 39 35 -74 68 65 64 61 58 58 53 -29 23 19 18 16 14 11 -56 50 49 48 44 41 40 41 -36 31 30 28 25 21 19 19 -53 47 46 42 38 -72 67 63 60 59 56 54 47 -35 30 28 26 20 18 -34 27 25 23 18 16 18 -46 39 32 29 26 24 24 -77 71 66 64 61 58 57 53 -77 71 70 63 60 54 -34 34 36 37 40 44 47 51 -55 59 61 62 60 -95 95 92 91 88 91 -92 95 92 89 89 88 89 -81 83 85 87 90 93 99 -30 24 22 15 12 -76 80 81 82 85 87 92 92 -82 83 81 80 80 -24 27 30 31 31 33 35 33 -32 26 28 27 28 -33 26 25 23 21 20 17 -74 70 67 61 60 58 58 -95 95 93 95 98 -50 50 51 49 47 45 47 -85 82 80 78 76 69 -34 27 27 24 21 20 18 13 -60 56 56 55 54 53 51 44 -47 47 53 54 53 -72 72 70 70 70 -9 7 10 11 14 16 15 14 -37 41 42 44 45 46 49 51 -42 36 36 33 33 -61 66 70 71 71 -77 72 70 66 60 -48 44 41 38 39 37 37 -46 43 45 43 41 41 -63 67 70 72 74 75 78 82 -2 3 6 6 9 11 11 -84 82 80 77 75 71 70 66 -94 90 89 92 89 82 -17 17 15 12 11 9 7 5 -72 75 73 73 73 -48 47 45 42 40 39 38 37 -3 4 6 7 9 -33 35 36 37 40 43 44 45 -49 51 52 53 54 -26 28 31 33 34 36 -55 52 50 47 44 -84 81 79 77 75 72 69 68 -90 91 93 94 95 98 -47 45 44 42 39 -22 23 26 28 29 30 32 35 -69 71 74 77 78 80 83 -53 56 57 58 61 64 66 -20 21 22 24 25 27 28 29 -37 34 33 32 31 28 -42 44 47 50 51 -94 91 89 86 83 81 -75 72 69 66 63 62 -50 47 45 42 39 37 -31 33 34 36 39 40 -30 33 35 36 38 40 -30 27 24 22 19 16 15 -20 21 22 25 28 31 33 -68 70 72 73 76 77 79 -13 14 16 19 22 -47 44 41 39 37 34 33 32 -73 75 77 79 81 84 -21 24 26 29 31 -79 81 84 85 88 -56 53 52 51 48 46 -71 74 75 76 77 -66 68 69 71 73 75 -37 35 33 30 28 26 23 20 -47 49 52 55 56 57 -95 93 91 89 86 85 82 -19 21 24 26 28 30 -71 74 76 79 80 82 84 85 -57 55 54 52 50 -75 77 80 81 83 86 -57 55 54 51 49 46 -99 98 97 94 93 91 -29 26 25 23 21 18 -61 60 57 54 51 49 47 -34 33 31 29 27 26 -79 77 74 73 72 -83 86 89 91 92 94 -41 39 36 34 33 -41 38 36 33 30 29 27 25 -16 18 21 22 25 26 -86 85 84 83 81 78 76 73 -28 29 31 34 36 37 -34 31 30 28 26 25 -82 79 77 74 73 72 71 -90 91 92 94 95 98 -47 46 43 41 38 36 34 -62 59 56 54 52 -45 42 40 38 36 34 32 -26 25 22 19 16 15 14 -37 38 40 43 45 46 -84 81 79 76 75 74 71 -77 80 82 85 87 90 92 95 -35 38 39 40 42 45 46 49 -30 33 36 39 41 44 -48 51 54 56 58 59 62 -28 29 30 32 34 35 36 39 -37 39 40 42 44 46 -21 23 24 26 27 28 31 33 -79 78 76 73 70 68 67 66 -38 37 34 32 30 28 27 -77 75 73 72 69 68 66 -13 14 15 18 20 21 -83 81 80 79 77 75 -33 36 38 40 43 44 46 49 -63 61 60 59 56 53 50 47 -23 24 25 26 27 29 30 -97 94 93 92 89 -61 62 63 64 66 69 -32 33 34 37 40 -72 71 68 67 64 62 59 -32 34 36 38 40 41 44 46 -55 52 51 50 48 47 46 45 -36 37 38 39 42 -56 57 59 60 61 63 66 -87 85 82 80 77 76 -8 9 12 14 16 -81 82 83 86 88 90 91 94 -57 58 59 62 65 -49 48 46 45 44 42 41 -75 74 73 71 69 -46 48 49 52 54 -90 89 86 83 82 79 78 -30 32 33 35 37 39 42 -49 48 46 45 44 42 -13 16 17 20 22 25 26 29 -67 64 62 61 59 -32 29 28 25 24 21 19 -57 58 59 60 63 64 -9 11 13 14 17 19 21 22 -43 44 45 48 51 53 -14 16 19 22 25 26 27 28 -77 75 73 71 68 66 64 61 -26 24 22 21 18 17 16 -80 79 78 77 74 72 71 -24 25 28 31 34 35 38 -50 52 55 58 59 62 -52 53 56 58 61 64 65 68 -21 19 16 13 11 10 7 6 -3 5 8 9 10 11 -38 37 36 33 30 27 24 -99 97 96 94 91 88 86 -54 51 48 46 45 43 42 -91 90 89 86 85 83 82 79 -34 37 39 40 43 46 47 -15 16 17 19 21 22 24 -42 41 38 35 33 31 29 27 -87 84 81 80 78 76 -80 82 83 86 89 -82 79 76 75 72 70 68 66 -45 47 50 51 52 55 56 -36 39 41 43 45 47 50 -57 55 54 53 52 51 -76 74 73 72 70 68 66 -67 66 65 62 60 -55 54 53 50 48 45 -80 81 84 85 86 88 91 -38 40 43 45 47 49 50 53 -82 84 87 88 90 -69 72 74 77 78 79 82 -51 53 55 58 60 -19 16 14 11 8 5 3 -42 41 40 38 36 -21 19 16 13 11 10 -29 28 27 25 23 -9 10 12 14 17 -88 89 92 95 96 -65 66 68 70 73 74 77 79 -18 15 14 11 10 -45 48 51 53 56 -84 82 81 79 78 77 -56 58 59 60 62 63 64 66 -67 64 63 60 58 56 54 53 -92 90 89 86 83 82 80 79 -54 56 57 60 62 64 67 69 -97 96 95 93 91 89 -65 64 62 59 57 56 55 53 -47 49 52 54 57 59 62 -78 81 84 86 88 91 92 93 -24 26 27 28 30 32 -49 52 54 55 58 61 -84 83 82 81 80 -29 30 31 34 36 39 40 -86 85 82 79 78 -31 32 34 35 36 -77 76 73 72 69 67 65 -60 59 58 55 53 51 48 46 -65 68 70 71 72 -56 54 52 51 48 45 -38 36 33 31 28 25 23 -38 40 42 43 44 -88 86 85 83 82 81 79 78 -13 11 10 9 8 -81 79 78 77 76 -81 82 85 86 89 -66 63 60 58 55 -3 4 6 9 12 15 17 19 -31 34 35 36 39 -26 27 29 32 35 36 39 42 -26 25 22 21 20 19 16 -84 82 80 78 75 -70 71 72 75 76 78 80 83 -63 60 58 55 52 -65 63 61 58 56 54 -60 61 62 63 65 -44 43 42 40 39 38 -2 5 6 7 9 10 13 -4 6 8 9 11 12 14 -61 58 57 56 55 -71 72 73 75 78 -60 63 65 67 70 71 73 -20 17 14 13 10 -64 66 69 72 74 75 76 78 -41 44 47 48 49 50 51 54 -48 47 44 41 39 36 -30 32 33 35 37 40 43 -10 12 15 17 20 21 22 25 -5 8 11 13 16 19 22 25 -36 37 40 41 42 -59 60 62 63 66 -62 59 58 55 53 50 49 -28 27 26 23 21 -26 29 31 32 34 36 -59 62 65 67 68 -77 80 81 83 84 86 88 90 -35 34 31 28 26 -40 43 44 47 50 52 -90 87 86 84 83 81 80 -45 44 42 39 36 -4 6 8 9 12 -27 24 22 20 19 16 14 11 -70 71 72 75 77 80 -54 56 58 59 61 63 66 -27 25 24 21 18 16 -73 75 78 80 83 85 87 -57 58 61 63 65 66 67 -74 72 71 69 66 65 62 -98 97 95 92 90 -14 11 10 9 8 5 -9 6 5 2 1 -29 32 33 36 38 39 -93 90 88 86 83 80 77 -38 41 43 44 45 47 50 53 -25 24 21 20 17 -18 17 14 11 8 6 4 1 -3 5 8 10 12 -87 88 90 93 96 -85 86 87 90 91 92 95 -29 28 25 24 22 19 -89 88 86 83 82 80 79 76 -70 69 67 65 64 61 -37 40 42 43 45 46 49 50 -1 2 4 5 8 10 -85 82 80 79 76 73 70 69 -95 92 91 88 85 84 81 80 -35 32 29 26 25 22 -26 24 23 22 21 19 18 17 -92 93 94 95 97 -37 35 32 30 27 -61 59 56 55 52 50 49 46 -32 35 36 38 41 43 -74 77 78 81 82 -88 86 83 82 80 -52 55 56 57 60 -61 64 65 66 68 70 72 73 -35 34 33 30 27 26 -21 24 25 26 28 31 32 35 -12 14 15 17 18 20 22 24 -28 31 34 35 37 -94 92 89 88 87 84 82 -43 42 39 38 36 34 31 29 -37 38 39 42 45 47 50 53 -82 85 87 90 93 96 99 -74 77 78 79 81 83 -86 83 80 77 76 73 -98 97 96 94 92 90 -25 23 21 19 18 15 -68 65 63 61 59 -34 37 38 41 44 45 -70 67 65 63 61 58 56 53 -34 32 30 27 25 -55 53 50 47 44 43 -44 47 50 51 53 -90 87 84 81 80 77 74 -18 19 22 24 27 -18 19 21 24 25 28 31 34 -43 42 40 38 37 35 34 -57 56 54 53 52 49 48 46 -16 18 21 22 25 -20 21 23 24 27 -79 80 83 86 87 90 -83 81 80 79 77 75 72 -37 40 41 44 45 47 49 -28 27 25 22 21 -20 18 15 14 13 10 9 -51 52 54 57 60 61 63 66 -71 73 74 77 80 81 83 85 -14 15 17 18 19 21 -73 75 76 77 79 82 -36 33 32 31 30 27 24 23 -69 71 73 75 76 77 80 81 -75 78 80 83 86 87 -11 14 17 20 23 -92 89 88 86 84 -68 67 64 62 60 59 57 56 -21 19 18 15 12 11 10 9 -42 40 39 38 37 -71 74 75 76 78 80 82 -7 8 9 12 15 18 -21 18 17 15 13 11 -70 68 65 62 61 58 57 -32 31 29 27 24 23 22 -4 7 9 11 14 -35 33 31 30 29 28 27 24 -30 33 36 39 42 45 47 -12 10 8 7 5 -47 48 50 53 56 57 59 -67 69 70 72 75 77 78 -27 24 22 19 16 15 13 11 -15 13 11 10 9 -43 40 38 35 34 31 -45 48 50 52 53 -76 77 79 81 82 85 -90 88 87 84 82 79 77 76 -28 29 32 35 38 41 43 46 -61 64 67 70 73 75 78 -55 52 51 48 46 43 42 -9 12 15 18 21 24 27 -85 87 89 91 92 94 95 97 -75 74 73 70 69 66 -35 36 39 40 43 -52 55 58 60 63 -59 62 65 66 68 70 73 -17 15 13 11 8 7 4 -37 40 42 44 46 -21 19 18 17 15 -27 28 29 32 33 36 -9 12 13 14 17 20 21 24 -88 91 94 96 99 -69 71 72 73 74 76 79 -60 59 58 56 53 50 -86 84 82 79 78 76 74 71 -98 95 94 91 89 -70 68 66 65 64 61 -16 15 12 11 8 6 5 -16 19 20 23 24 27 30 33 -47 49 50 51 53 55 58 -79 82 83 84 86 87 89 -93 91 88 87 86 84 -17 14 13 12 11 9 7 -83 81 79 78 76 75 -78 79 82 85 87 88 -38 40 43 44 45 48 49 -44 43 40 37 36 34 -94 92 91 89 88 -7 9 11 12 14 -94 91 90 89 86 -11 12 15 17 18 19 20 -32 30 27 24 21 18 -48 47 45 43 41 -51 54 55 57 59 61 64 -28 29 31 34 37 38 39 42 -85 84 83 82 81 78 75 -70 67 64 62 59 -52 50 47 44 42 -72 74 75 77 78 81 84 -7 8 11 14 15 17 19 -38 39 42 43 44 -66 68 70 73 74 75 78 79 -64 65 67 70 73 -58 56 55 53 50 49 -77 78 80 81 84 -32 34 35 37 39 -7 9 11 12 13 14 -38 41 43 46 48 49 52 -24 27 29 32 33 35 38 41 -77 74 73 70 69 68 66 -14 17 19 22 25 28 31 34 -41 40 38 36 34 31 30 -30 28 26 23 22 21 20 -50 47 46 44 43 42 -56 53 50 47 45 44 41 -70 73 76 78 80 82 -41 42 45 48 50 51 53 54 -45 42 41 39 37 34 31 29 -58 57 54 52 50 -17 20 21 24 27 -54 56 58 59 62 -73 76 78 80 81 -17 19 20 22 25 26 29 -47 48 50 52 55 58 -23 20 17 15 13 10 9 -72 71 70 68 65 62 60 59 -85 83 81 80 79 -80 79 77 76 73 70 68 -96 94 92 91 89 -36 38 40 41 42 44 -21 24 26 29 31 33 35 -62 64 66 69 71 -90 89 87 84 82 81 80 77 -19 20 21 23 25 27 -23 20 17 14 13 12 11 9 -67 69 70 72 73 75 78 80 -3 6 7 10 12 -60 63 66 67 70 73 76 78 -87 85 82 79 76 -6 9 12 14 17 18 19 -62 60 57 56 53 51 -54 52 50 49 48 -64 63 62 61 60 57 55 -75 76 78 81 82 84 -65 64 62 60 58 57 55 -62 63 66 68 71 73 -41 43 44 46 49 51 52 -15 13 10 8 6 -25 23 21 19 17 14 11 8 -56 58 60 61 62 64 66 69 -78 80 83 85 86 87 89 -35 37 40 42 44 47 48 -72 75 78 80 81 82 83 -30 32 34 35 37 -62 60 57 54 52 49 48 46 -96 93 90 87 85 84 83 -57 60 63 66 67 70 -77 75 72 70 67 -88 87 84 81 79 -22 25 26 29 31 32 34 -24 23 22 19 16 15 -57 56 53 50 49 -7 10 13 15 17 18 19 21 -19 22 24 27 29 -30 28 26 23 22 20 18 15 -5 6 8 9 12 -59 58 55 53 52 50 47 46 -35 34 32 30 27 24 22 -67 64 63 61 58 56 54 -71 74 77 78 79 -26 29 32 35 36 39 -90 88 87 86 84 -23 21 20 18 16 15 14 -11 14 17 19 20 21 23 -75 78 79 80 83 -45 48 51 54 57 58 59 62 -34 31 29 26 23 20 18 17 -17 15 12 9 7 5 -38 37 36 35 34 31 30 27 -56 55 54 53 52 51 50 49 -78 80 82 84 85 -46 45 43 42 40 38 35 -25 27 30 31 32 33 35 -27 30 32 34 37 38 -91 90 88 85 82 81 80 -27 25 23 22 20 17 16 -88 87 86 83 80 -96 93 92 89 87 84 81 -42 43 45 47 48 49 50 -21 20 19 18 15 12 9 -57 58 59 62 64 66 69 -52 49 46 44 42 -35 34 31 28 26 23 20 17 -79 76 75 73 72 71 70 68 -24 25 26 29 31 32 34 -75 77 80 82 84 85 87 90 -2 5 7 8 11 12 14 -27 26 23 20 17 14 12 -55 58 59 62 64 67 68 69 -33 34 37 40 41 42 -68 69 70 71 72 -18 17 15 13 11 8 5 4 -63 61 60 58 56 54 53 52 -22 20 19 16 15 14 -56 57 58 59 60 62 -84 85 88 90 93 96 -26 27 29 32 34 35 -88 85 84 81 78 75 73 70 -52 50 49 46 44 43 40 -41 40 37 34 32 29 26 23 -81 79 76 74 72 -51 53 55 56 58 61 62 -58 57 56 55 54 -47 44 43 41 40 -83 84 86 88 90 91 92 94 -84 83 82 81 79 78 -15 14 13 12 11 10 9 -31 28 25 24 21 18 -73 72 71 70 69 -44 46 48 49 51 54 55 58 -8 10 13 14 17 18 -78 77 74 73 70 -8 10 12 13 15 -47 46 43 42 40 -94 91 90 89 88 85 84 83 -41 43 45 46 48 -65 66 67 68 69 72 75 -97 95 94 92 91 89 -68 71 73 75 78 -35 37 40 42 44 -63 65 66 67 68 71 74 76 -85 88 90 92 95 98 -75 73 70 67 66 -91 89 87 85 82 79 77 74 -33 32 30 27 26 24 21 20 -88 85 82 79 76 74 73 71 -31 33 34 35 38 41 42 43 -10 11 12 15 17 20 21 diff --git a/day03.kts b/day03.kts index d9252a5..411af93 100755 --- a/day03.kts +++ b/day03.kts @@ -2,7 +2,7 @@ import java.io.File import java.util.Scanner -val scanner = Scanner(File("day03input.txt")) +val scanner = Scanner(System.`in`) var partOneSum = 0 var partTwoSum = 0 var doState = true diff --git a/day03input.txt b/day03input.txt deleted file mode 100644 index 010c054..0000000 --- a/day03input.txt +++ /dev/null @@ -1,6 +0,0 @@ -?% mul(948,148)why() %how(670,744)mul(590,32);where())#}from()>how()mul(611,372)}{~^?>from()^mul(835,665)who()]#^don't()select()select())mul(724,851)[>&mul(188,482)$mul(781,111)[who()&from():!mul(147,678)how(){mul(938,510)where()!$?*['mul(103,563)where())mul(4,125)$*>>^mul(126,929)]& %~mul(161,418)who()>>do()]-''?mul(416,366)~?/where()]who()mul(459,47))>what(){@[(mul(219,400)+do()when()from():who()when()]&{{%mul(804,830)-select()what()*what()%}mul(861,992)who()!',mul(159,874)#<)''how()@$%mul(214,139)&how()>mul(112,835)select()*from()@why()?[{mul(209,568)/; ~)mul(630,749):mul(841,589)/;who()>[mul(778,567)+when() how()<#mul(544,851)what(){+mul(327,103)from()what()/[~-mul(995,415)/when()-mul(880,153)}:}mul(368,920)'how()mul(864,419)from()what()@mul(208,291)who()}^from()mul(154,571)++:>,mul(601,458)why()<;how()~from(172,16)mul(333,315)?[mul(513,260) {*mul(117,759)%]mul(77,644){($%>]&~mul(238,306)~select()from();-'who()'mul(460,352); ?select()>[[(from() mul(337,294)why()how()mul(499,785)>what()[*:#where()*what()mul(765,210)*$[]mul(461,957)##)+}when()-@:mul(198,90)what()what()how()') )mul(258,966)]+(when()mul(535,417)where()!don't()@mul(939,319)?mul(751,538))! mul(758,675)~how()[how(),@>[where()when(29,965)mul(358,39){^what();/(where()how()mul(271,786)why():mul(792,761)do()$]%mul(740,232)>who(949,378)what()[(where()who(){who()#mul(595,343)%+mul(194,296)'mul(161,747): '{where(12,567),@mul(234,39)!+do()/who()[where()&'what()when()how())mul(138,925)),#;where()>{mul(738,864){mul(605,662)*when()%when()+( /~&mul(633,935)when()];mul(263/}*mul(127,821)^how()$$select()select()@^{:mul(867,979)&%/>{%^how()what(499,657)+do()%what()(~;-:*mul(438,941)<]?]mul(208,834when()&^;]from()when(613,710)^}+$mul(809,573)mul^)*:from(379,983)mul(47,786)}when()-what()how(450,632)> where()how()mul(810,597 ;;{%(select()select()&,mul(356,249)from()/!{#&^mul(23,248)(!who()]-+,mul(873,987)]{what()< )-{^mul(591,317)/mul(382,188)mul(476,338)*why()$]mul(865,625)who()})?select():*@[)don't()/ ,mul(737,418)select(318,357);+ what()where()don't()%#>!>/@what()[mul(490,823)&^( ,'@ [do()@mul(855,491)*^why()[,mul(348,679)how()$who() '&how(16,459)/!;mul(43,422)#^from()![}select()mul(976,749)-}select()-where()select()mul(223,589)%[why()mul(868,881)mul(178,790)$,{who()from()#,mul(318,399):where()?[mul(182,864)where() mul(156,690) -]mul(857,353)#'%,},>?+@mul(914,528)where()$mul(785,748)<$who()[mul(453,859)%'@ mul(84,729)/{do()(?$<}mul(820,286)?:*?}#when()(%mul(245,958when()?from(),+mul(128,335)mul(463,102);:]@-~-%mul(914,398) -+mul(720,985)how(340,568)^!what()[),[mul(734,270)~')?who()]]mul(964,739)from()?who()$when() /mul(566,142)}*,?how()~mul(733,766)when()mul(319,914)when()mul(808,141)*@:&who();mul(736,736)where(){&!$when()]^mul(612,574)how()mul~]what()!!'[:mul(805,568),<^+~ #)&who()mul(810,729),[~/^<&mul(706,233)!-'{why(),(?&mul(28,746)%mul(127,170)-?} #don't()from(),[@,mul(282,734)mul(332,651)[:~mul(771,888)#who()^select(110,751)>who(){mul(655,334)why()+~&}mul(129,762)mul(597,498))*~-}who()who()~'$mul(235,859)where()^-,,@mul(661,707)[ ~,<-mul(502,445)?why(){why()from()-how()*>&mul(237,280)how()mul(669,512)#$< mul(426,417)[what()why()~select()*%,'where()mul(213,617)##>mul(148-how()&]mul(437,581)who()'%[:how()mul(985,24);mul(446,704)who(),mul(549#}%>[mul(58,502)%mul(55,502)~^[%%;mul(63,642)>how())<*{mul(155,625)]mul(238,47)where()&@mul(630,112)who() mul(570,946)mul(299,320){({mul(307,251)%[]$%mul(621,739)^!}{^-+what())mul(350,650)!>who()what()]^,*mul(154,394)&?^mul(410,870)[-select()why()mul(744,141)why():))from()^select()what()mul(991,854){-]+mul(64,859))~>>%>%select()#-mul(282,835)'select()'%<$!from(299,765)don't()-'mul(352,659),mul(366,409),when()mul(672,590)#@#}/(## mul(550,937)$#/^~mul(458,447)mul#(,/(how(),mul(465,230)^select()$how()what()#@};(from()~mul(716,318)from()+]mul(701,784)!;>do()'&)when()select()mul(945,704)mul(250,874)who()]@don't()why(51,895)-,how()*+{why()%/mul(964,293)&<^where()-from()mul(635,212)when()how()[mul(314,335)%(- + ~mul(635,915)~[[do(){where(307,78)(who()(why()where();mul(450from()mul(903,662)>$mul(924,200),why()select()$mul(418,533)where()[where()mul(266,643):~^/#(:[from()mul(81,715),who()@:~+who()'%mul(79?who()select();# mul(436,105)#*why() #~[,where()'mulwho()[(~)[mul(119,92)]where(),select()why()?mul(639,691):+mul(188,19)who()(select()what()mul(916,808));~mul(630,228)-)where()[~mul(586/[how()+~!>}>[how()mul(106,235)do()>why(416,339):mul(788,357)[when(442,691)what()how()where()$from()who()mul(471,832)]/*mul(837,328)<)>!mul(389,633)'from(),mul(70when()!from()select()$](when()*%mul(903,43)where(62,223)^from();@()mul(852,198)-when()?mulhow(168,455)(select()how();from()/mul(918,330)what()'how(215,263)$:{~how()*mul(136,552)from(363,441)-when()how()what()-+mul(229,899)!where()when()from(){mul(47,875)~mul(500,586)/&&where(),where()mul(571,252))%}^~when()mul(979,493)do()@!+~>^mul(568,461)]where()$who(){from();mul(743,403)@?[mul(117,954))/mul(382,589)<:what() mul(578,730)#/<,when()#)select()}mul(889,462){how(562,136)select()when()^>mul(150,815)/$from()?what()mul(842,604)**?'-^>;~'mul(622,493) -mul(901,810)[<,^$do()<#why();/why()mul(296,969)@mul(224,163)#<$what():,what()mul(995,485)$~)who()mul(382,831)'&~mul(146,234)mul(228,532)mul(944,430)!!who()<;'$(%do()%'{mul(588,828)~$why():where()mul(753(select()/':~$[mul(785,897)/<(#$)@mul(821,858)$what()+@/*mul(545,209)where();what()mul-why()>mul(808,588),where()];;}mul(431,815)<<;how()?@why()(^don't()select()$)!mul(832,43)what()[where()mul(935,377)from()++where()$-]@mul(793,489)*&mul(910,985)mul(340,122);from(87,683)[[]]'mul(659>from()['from()~,;@:^mul(420,510)/mul{from()$ >! -mul(508,275)!()@+{!mul(134,503)how()?mul(717,994)@}what()}[@mul(899,477)who(88,557){[?-mul[how()>>@mul(113,239)&;?what(825,719)from()}@mul(717,829)when()who()%@what()when()#':mul(644,495)]^$ >[~don't()!#mul(175,323)><$>do()[[$what()/>(#~mul(976,792))what()#{how()-$?mul(534,805))what()@mul(600from()'from()mul(859,367)from()mul(852,796)?{[]/'~mul(624,853($:;^mul(522,963)+mul(143,246)[,what()#*when()',why()mul(435,720)mul(812,909)'&!!who()how()/,who()>mul(179,82))]don't()@(}@!mul(224,804'}-mul(180,723)#+@mul(144,160 +#<]where()+!from()select()(mul(614,183)mul(123,655)*+##mul(744,352):#$when()~&,what(625,950)select()'mul(468,293)*]+#mul/$why()where(623,670)%@;mul(722,469)&(%;do()) from()mul(557,124)/}:mul(928,793>]how(){?who()'[mul(624,959)&mul(765,13):who()<),who()& mul(639,802)&;(@:why(988,378):mul(677,987)~@-! ;!^do()mul(29,935)mul(134,862)when()+{what()when()who()}~why()mul(541,335)who()@['+why();when()&mul(127,948)$mul(485,474))?$mul(278,206)select()mul(641,623){} @{*where()'?mul}>mul(792,193) [#;*%->~what()mul(876,897)/@+'mul(341,837)^)why()?;@+^^~mul(718,922)[why()when()/,{}select()who())mul(941,117)/}/who()why(293,857))mul(414,482)what()! how()who()mul(910,766)!]what(),how()*mul(6,611)~;{who()who()[--mul(720,952)why(546,471)!)from()/?mul(971,461)}&/$@'mul(452,187)#who():(mul(44,298)mul(530,770)']:who()&$from()mul(544,752)mul(375,827))&@select()^;who()where()how()mulselect()^%^,/&mul(204,187)when()&,}$(who();mul(60,317)+who()$from()(how(942,734);@mul(239,338)!?:%)}@select()(mul(284,525)select()what()where()@^#~[mul(718,185)&!*{';when()@when()mul(272,161)how()%how()?mul(66,988)@)@,::>)mul(930,190)why(),~when()%<@&where(),mul(143,136)why()-,/*-what()+mul(73,408)~ who()%*select()'+where()#!/usr/bin/perlmul(379,680) -;@mul(257,25)[!mul(646,635)>?who()who()from()mul(25,275(select()+why()%mul(102,254)%}/where()$mul(608,18)when()*#mul(343,951) mul(337,866)*^?#@why(805,831)-mulwhen()from()mul(854,5)when()@$why()mul(896,11)^mul(451,271)'how()?who()?)<%[}don't()who()/[{]-?from()when()?mul(198,238)])mul(750,760)+/-!what()~?#mul(880,271)%?select();where()(<^select()mul(373@from()where(),mul(700,15),mul(406,120)mul(551,206)mul(636,315);+{mul(261,201)mul,:-/&mul(267,217)/,'mul(132,410)@@;;who()when()]do()why()mul(4,121)#from()/mul(242what()how(277,558)'how()how(){mul(12,537)&[>}mul(322,676)[#,do()@,mul(248,663),when()-do()^what()]when()who()what()how())mul(864,73)how()?]*mul(653,55)when()from()from()how()@ }mul(94,590)]~what()mul(164,505)]from()when()]mul(218,565)(from() why()[*when()}[mul(306,447)*]][> #mul(783,715?)+^~mul(308,994):<*~)>from()why()*mul(508,139)>from()@;+~#mul(652,903)#[/?mul(407,208]how(){when(),**@*:/mul(849,965)mul(69,198<'#%[?mul(236,808)what()from()%from()why()^/,don't()select()&where()@mul(888,101) mul(332,775)who()):select()),:-mul(119,209)%how()mulfrom()select()don't(){mul(838,613)why() '({*~>*mul(466,106)mul(883,754->(%%who()[!mul(587,792)'((!?select()&}-'#)why()#[mul(234,162),what(497,671)why()#mul(985,797)>}~;from()select()mul(117,492)&~+from()]%>*$&mul(451,669))}'/@how()?where()why(694,295)'mul(676,756){~;select()what()}what()^}mul(963,857);%/how()?mul(944,194);select()<&^how(){->mul(195,702))?select()why()&~%}why()#mul(90,304)@%why(673,634)*/where()- <:do(){}!mul;who()]where()]-@?when()how()how()>mul(875,604)select()%do()%mul(790,136)*$,mul(853,95)[how()>!%?mul(246,573)&!what()/#from()!mul(382,307),!#[-mul(32,733)$+[*mul(192,47)(@who()mul(304,303)@mul(167,528):select())!:how(){what()(}mul(933,177))#>$#,$:mul(81,603)what()?how()when()mul(206,607)!'^mul(666,852)mul(651,206)!+]}from()don't():*]#what()mul(359*%who()^)'mul(190,764)who()when()}select()~(~mul(547,102)mul(406,618)%when()>)![#mul(890,746)#who()$'~%]',+mul(341,395)who()--mul(285,533)}how()@<}!mul(715}>+~ select()where()$ (mul(894,62)?]}who()&when(652,875)%:}from(24,82)mul(713,250))-^{*%mul(548,903)&]]<]why(){from()when() mul(796,100)-(how()$%~mul(589,969) :who() @mul(271,734)<}mul(761,8)}@['- ['$mul(178,28)who()who(282,161)@$from()mul(413,253)#when()?(mul(585,394))select():$?#?>who()?mul(245,344)who()^who()where()why()~@why()don't()why()how()who(450,27)who()(!mul(951,644):select()-)%?*don't(), mul(189,841)]* why()*>'mul(758,690)what()@>mul(728,932)how()?select()what()}mul(716,985){where()who()+who():mul(840,772)%how()>:;where()mul(139,830)$select()),mul(730,4)when(305,277);[$!,)mul(278,740)who(856,922)who()#mul(212,541)((]mul(689,475)mul(814,611)'}&~{~~mul(716,817)who()mul(21,315))don't())(why()')$)who()how()?%why()}!{<{mul(41,189)-&+from(544,351)~&mul(516,38)]?;-@?don't()@}*mul(792,426when();#~ >%why()(/$mul(755,392)*(#]where()@select(),^select()mul(630]>*who(267,517)why()-;(mul(176,492)select()from()}~:who()mul(761,226)&,((mul(750,451)@/%select()from()mul(345,75)what()/who(); ~mul(431<)&mul(693,289)?~/mul(693,335)'mul(475,545){(*+~ mul(668,535)how()don't()?,<@mul(980,251)*why()$when()*-)mul(886,969):?/':]}-who()(mul(686,683)#}+($why()mul*^*$){&-(mul(94,775)- @when()?%]{when()mul(376,100)''/,&]^mul(70/:from(184,559)>mul(679,138)))(~mul(929,872)'%#)mul(563,750)>(mul(324,725)what()why()[@$mul(186,770)?mul(719,251)[mul(270,934)+>when()'$when()mul(647,486)how()from(947,190),!(?mul(113,517) %[select()what()^)!mul(299,591)]:@' *where(145,530)/mulwhen()mul(811,260)mul(80,605) where(296,197))])>from()mul(324,361)select(){[/';/},mul(648,947&how(){who()/'-%*]mul(949,359){mul(288,162)&];&:^mul(188,899)select()where()]%mul(248,30)#[&+'why()'') don't()][}& mul(808,221)what()@>><;>*mul{;>what()what()+mul(646,752)select())'where()!mul(748,585)>?<##mul(381,399)mul(597,746)) *mul(881,573)/:({why()'mul(527,57)@/what()?mul(395,551)%who()when()%'mul(713,766)[[)*select()mul(313,218))when()when()mul(360,494<-select():::- [/mul(517,923)*from(),from()how()+]mul(870,559)}{*?do()>~mul(704,518)where()!)select()?from()where()&'do();mul(270,449)~[*mul(774,600)how():>why()[!when()mul(338,711){]mul(962,193)*where()#![-+mul(511,924):[who()why()}mul(252,534when())when()when()()'!why(230,750)-mul(543,358)~~ -mul(394,506){mul(176,192)who()from()%@mul(181,776)%[ don't()when()where(229,174)+}@who()where()]>mul(553,452)@{/mul(790,202)&&-]mul(783,999)'mul(123,410)<,#what()}how()when()from()$~mul(674,974)why()#>do()'[$]}when()mul(907,824)from()select(){what()mul(584,273)#<>>do()mul(767,778)how()how()from()[#<$from()how()>mul(133,565):mul(888,792) -who()where()don't()]mul(891,277)~mul(160,638)('don't()/@/%{mul(462,975)!^:+mul(317,407){who()/from()/mul(424,628) when()select()mul(415,352)!?[where(){?how()/mul(661^, -mul(141,973)(/where()!#who()(what()#$mul(916,889)when()$ )mul(945,846)why()+#where()@how()mul(147,694)%select()mul(414,149)< when(){)what()&[how()mul(903,731)~#mul(389,694)mul(72,447)mul(490,881)?++from()>+ ^(mul(703,722)mul(622,578)from() }@^)+mul(642,732)>from()where()@>${who()mul(526,211$why()[why()mul(349,908)who(635,389)from()what()*$*>@mul(180,150)//: ^mul(622,131);[-^~-mul(32,430)mul(306,173)~where()how() (mul(292,552)'where()!do() why()~] who()@^mul(20,119)?[$+/$^mul(242,536)who()'-&'from()mul(351,640){,]~mul(152,587)@select(140,751)<+mul(387,212)[where()%when())how()& >mul(916,539)~]?[when()>!when()??mul(322,151)!]!]~!;mul(27,537); ##;^}}mul(538,277)why()mul(205,526)mul(412,826)^@?where()'mul(957from(193,394)from(863,680)!@how()mul(771,563)( who()mul(377,655) ]select();who()mul(360,272)-select()$what(){mul(291,618)})from()^when(),how()where()don't()why()+&mul(462,803)^$,mul(788,584)@ %?:![:mul(439,528)mul(129,761)]!~mul(321,102)mul(41,728){&what()how()mul(93,933))[ where()^*@+mul(553,965select() '&{-mul(712,817)//&mul(482,328)when()'mul(957,978)-}{[>{@what()who()mul(48,186)?]how()$what()&,)mul(33,872)#mul(125,207):;mul(143,386)how(),select()don't()}#when()%]&^@?^mul(107,59)&%?don't()mul(183,332):{}/[(#%-+mul(766,627)from()who() what()-+$^mul(41,791)who()] ;-#select()~mul(939,288)[:(@what()who()?mul(210,210)?select()why()select()where()-how()^mul(755,497)+?^(mul(860,478)^}+$from()(mul(565,649)}mul(184,450) ;/+%[why()mul(752,488)$how()mul(349,56)#'%,+mul(571,637)(mul(186,674)?how() ,'^#!mul(577,819)mul(767,490)how()@when(359,565)mul(97,67)when()?where()>,'(-mul(267,998)%where()why()where():mul(593,317)from(),mul(541,30)/why()${[from()who() mul(732,465)[>() var pagesList = mutableListOf>() -val scanner = Scanner(File("day05input.txt")) +val scanner = Scanner(System.`in`) while (scanner.hasNextLine()) { val line = scanner.nextLine() if (line.contains('|')) { diff --git a/day05input.txt b/day05input.txt deleted file mode 100644 index cb087ad..0000000 --- a/day05input.txt +++ /dev/null @@ -1,1376 +0,0 @@ -96|56 -68|78 -68|96 -52|85 -52|14 -52|76 -85|18 -85|96 -85|13 -85|75 -64|15 -64|75 -64|16 -64|41 -64|49 -49|22 -49|88 -49|56 -49|67 -49|86 -49|78 -88|56 -88|16 -88|29 -88|22 -88|18 -88|41 -88|87 -33|17 -33|14 -33|95 -33|13 -33|85 -33|53 -33|57 -33|39 -83|47 -83|88 -83|77 -83|16 -83|32 -83|68 -83|76 -83|95 -83|99 -72|99 -72|74 -72|76 -72|13 -72|94 -72|47 -72|23 -72|77 -72|93 -72|32 -57|32 -57|53 -57|74 -57|64 -57|47 -57|95 -57|49 -57|58 -57|68 -57|76 -57|75 -47|78 -47|56 -47|17 -47|18 -47|29 -47|52 -47|26 -47|15 -47|96 -47|55 -47|27 -47|64 -74|29 -74|26 -74|22 -74|39 -74|27 -74|15 -74|88 -74|17 -74|64 -74|49 -74|18 -74|16 -74|47 -56|22 -56|63 -56|15 -56|41 -56|91 -56|86 -56|26 -56|27 -56|55 -56|72 -56|29 -56|17 -56|35 -56|67 -67|98 -67|73 -67|12 -67|83 -67|33 -67|23 -67|86 -67|87 -67|72 -67|15 -67|95 -67|79 -67|85 -67|91 -67|39 -87|93 -87|12 -87|14 -87|98 -87|32 -87|86 -87|74 -87|52 -87|72 -87|99 -87|76 -87|73 -87|57 -87|85 -87|23 -87|94 -12|93 -12|96 -12|76 -12|57 -12|49 -12|98 -12|58 -12|73 -12|74 -12|64 -12|32 -12|53 -12|68 -12|13 -12|77 -12|99 -12|85 -98|14 -98|85 -98|75 -98|83 -98|13 -98|23 -98|53 -98|32 -98|95 -98|64 -98|74 -98|77 -98|73 -98|96 -98|57 -98|58 -98|99 -98|93 -58|63 -58|75 -58|88 -58|13 -58|67 -58|49 -58|18 -58|26 -58|47 -58|15 -58|68 -58|77 -58|56 -58|74 -58|78 -58|16 -58|96 -58|14 -58|99 -32|96 -32|88 -32|13 -32|47 -32|68 -32|63 -32|29 -32|49 -32|75 -32|78 -32|26 -32|58 -32|14 -32|41 -32|67 -32|27 -32|74 -32|18 -32|76 -32|16 -17|94 -17|98 -17|13 -17|83 -17|73 -17|95 -17|14 -17|32 -17|86 -17|76 -17|57 -17|53 -17|72 -17|99 -17|87 -17|35 -17|85 -17|52 -17|12 -17|39 -17|58 -94|49 -94|13 -94|47 -94|53 -94|77 -94|57 -94|98 -94|83 -94|73 -94|85 -94|74 -94|14 -94|12 -94|95 -94|32 -94|79 -94|64 -94|93 -94|68 -94|23 -94|76 -94|99 -22|32 -22|86 -22|58 -22|13 -22|52 -22|93 -22|98 -22|94 -22|57 -22|85 -22|39 -22|23 -22|55 -22|72 -22|73 -22|79 -22|35 -22|12 -22|87 -22|17 -22|83 -22|33 -22|95 -15|94 -15|22 -15|91 -15|98 -15|55 -15|57 -15|72 -15|52 -15|83 -15|53 -15|95 -15|12 -15|32 -15|93 -15|86 -15|17 -15|79 -15|23 -15|35 -15|39 -15|87 -15|73 -15|85 -15|33 -41|55 -41|22 -41|86 -41|15 -41|52 -41|79 -41|98 -41|12 -41|93 -41|91 -41|33 -41|57 -41|35 -41|73 -41|87 -41|83 -41|72 -41|17 -41|94 -41|95 -41|53 -41|67 -41|39 -41|23 -93|58 -93|77 -93|56 -93|88 -93|74 -93|64 -93|23 -93|29 -93|49 -93|95 -93|27 -93|32 -93|85 -93|47 -93|78 -93|75 -93|83 -93|13 -93|76 -93|99 -93|68 -93|14 -93|96 -93|53 -91|94 -91|83 -91|32 -91|73 -91|17 -91|23 -91|39 -91|87 -91|58 -91|72 -91|86 -91|12 -91|79 -91|35 -91|85 -91|22 -91|53 -91|98 -91|93 -91|57 -91|95 -91|33 -91|52 -91|55 -23|95 -23|47 -23|76 -23|99 -23|26 -23|53 -23|14 -23|49 -23|77 -23|13 -23|68 -23|74 -23|29 -23|58 -23|64 -23|56 -23|96 -23|85 -23|83 -23|32 -23|27 -23|78 -23|75 -23|88 -55|98 -55|57 -55|52 -55|35 -55|87 -55|79 -55|73 -55|32 -55|95 -55|39 -55|58 -55|23 -55|17 -55|86 -55|72 -55|83 -55|12 -55|53 -55|94 -55|13 -55|14 -55|85 -55|93 -55|99 -53|85 -53|99 -53|49 -53|26 -53|47 -53|88 -53|27 -53|78 -53|83 -53|14 -53|58 -53|56 -53|32 -53|18 -53|75 -53|29 -53|68 -53|95 -53|76 -53|96 -53|74 -53|77 -53|13 -53|64 -63|94 -63|55 -63|53 -63|35 -63|73 -63|83 -63|67 -63|15 -63|57 -63|12 -63|39 -63|72 -63|86 -63|33 -63|41 -63|79 -63|91 -63|98 -63|22 -63|87 -63|23 -63|93 -63|17 -63|52 -75|94 -75|91 -75|87 -75|17 -75|56 -75|27 -75|33 -75|67 -75|78 -75|55 -75|18 -75|86 -75|63 -75|16 -75|52 -75|29 -75|72 -75|22 -75|39 -75|35 -75|26 -75|41 -75|15 -75|88 -73|64 -73|13 -73|74 -73|14 -73|53 -73|93 -73|23 -73|29 -73|76 -73|85 -73|88 -73|68 -73|56 -73|96 -73|75 -73|83 -73|77 -73|58 -73|99 -73|47 -73|57 -73|32 -73|95 -73|49 -16|33 -16|15 -16|72 -16|55 -16|12 -16|93 -16|53 -16|52 -16|22 -16|98 -16|17 -16|39 -16|79 -16|63 -16|41 -16|57 -16|87 -16|91 -16|86 -16|23 -16|35 -16|73 -16|67 -16|94 -86|68 -86|72 -86|83 -86|73 -86|95 -86|93 -86|47 -86|12 -86|13 -86|99 -86|76 -86|74 -86|58 -86|79 -86|98 -86|85 -86|53 -86|23 -86|94 -86|14 -86|32 -86|57 -86|77 -86|35 -13|68 -13|49 -13|63 -13|16 -13|77 -13|88 -13|99 -13|27 -13|67 -13|15 -13|14 -13|74 -13|26 -13|76 -13|64 -13|91 -13|75 -13|78 -13|96 -13|18 -13|41 -13|56 -13|29 -13|47 -26|57 -26|33 -26|87 -26|16 -26|98 -26|94 -26|35 -26|12 -26|18 -26|73 -26|67 -26|52 -26|41 -26|86 -26|79 -26|17 -26|55 -26|63 -26|39 -26|72 -26|15 -26|91 -26|93 -26|22 -18|91 -18|23 -18|87 -18|73 -18|55 -18|67 -18|35 -18|12 -18|94 -18|16 -18|57 -18|15 -18|39 -18|86 -18|63 -18|17 -18|79 -18|22 -18|52 -18|41 -18|72 -18|93 -18|33 -18|98 -77|17 -77|63 -77|26 -77|29 -77|56 -77|74 -77|22 -77|67 -77|88 -77|18 -77|68 -77|75 -77|41 -77|91 -77|47 -77|33 -77|96 -77|16 -77|49 -77|78 -77|55 -77|27 -77|64 -77|15 -27|16 -27|12 -27|41 -27|33 -27|18 -27|57 -27|72 -27|79 -27|87 -27|86 -27|35 -27|15 -27|55 -27|63 -27|39 -27|91 -27|98 -27|94 -27|73 -27|26 -27|52 -27|22 -27|17 -27|67 -39|93 -39|14 -39|86 -39|72 -39|85 -39|76 -39|32 -39|94 -39|52 -39|98 -39|53 -39|87 -39|12 -39|77 -39|35 -39|95 -39|73 -39|13 -39|23 -39|58 -39|57 -39|79 -39|83 -39|99 -99|67 -99|96 -99|77 -99|16 -99|29 -99|26 -99|18 -99|68 -99|91 -99|76 -99|64 -99|75 -99|27 -99|41 -99|22 -99|63 -99|49 -99|78 -99|56 -99|88 -99|74 -99|15 -99|47 -99|33 -79|49 -79|93 -79|23 -79|77 -79|73 -79|83 -79|64 -79|47 -79|98 -79|14 -79|76 -79|85 -79|53 -79|57 -79|99 -79|32 -79|74 -79|13 -79|58 -79|96 -79|75 -79|95 -79|68 -79|12 -76|27 -76|77 -76|22 -76|56 -76|29 -76|49 -76|68 -76|18 -76|64 -76|74 -76|33 -76|41 -76|16 -76|55 -76|15 -76|91 -76|26 -76|78 -76|67 -76|75 -76|96 -76|63 -76|88 -76|47 -14|78 -14|63 -14|75 -14|77 -14|29 -14|15 -14|91 -14|16 -14|76 -14|68 -14|74 -14|27 -14|64 -14|96 -14|56 -14|99 -14|67 -14|88 -14|47 -14|41 -14|22 -14|49 -14|18 -14|26 -78|52 -78|35 -78|15 -78|18 -78|16 -78|67 -78|12 -78|86 -78|63 -78|79 -78|17 -78|22 -78|27 -78|94 -78|39 -78|55 -78|72 -78|73 -78|33 -78|26 -78|91 -78|98 -78|41 -78|87 -35|76 -35|58 -35|14 -35|12 -35|64 -35|79 -35|99 -35|93 -35|98 -35|53 -35|77 -35|47 -35|32 -35|68 -35|94 -35|57 -35|85 -35|73 -35|83 -35|95 -35|23 -35|13 -35|72 -35|74 -29|87 -29|86 -29|26 -29|18 -29|15 -29|35 -29|41 -29|78 -29|52 -29|33 -29|98 -29|72 -29|63 -29|17 -29|67 -29|27 -29|16 -29|79 -29|39 -29|91 -29|55 -29|22 -29|94 -29|12 -95|49 -95|99 -95|56 -95|27 -95|29 -95|26 -95|63 -95|74 -95|47 -95|16 -95|96 -95|18 -95|58 -95|14 -95|88 -95|76 -95|78 -95|13 -95|85 -95|32 -95|75 -95|68 -95|77 -95|64 -96|33 -96|87 -96|18 -96|39 -96|55 -96|17 -96|75 -96|41 -96|15 -96|35 -96|63 -96|88 -96|27 -96|29 -96|86 -96|49 -96|22 -96|78 -96|52 -96|67 -96|16 -96|91 -96|26 -68|88 -68|56 -68|55 -68|63 -68|67 -68|39 -68|16 -68|27 -68|75 -68|49 -68|15 -68|18 -68|29 -68|64 -68|47 -68|87 -68|33 -68|41 -68|22 -68|26 -68|91 -68|17 -52|77 -52|98 -52|68 -52|74 -52|73 -52|99 -52|12 -52|83 -52|53 -52|86 -52|13 -52|57 -52|23 -52|95 -52|72 -52|58 -52|94 -52|93 -52|32 -52|35 -52|79 -85|58 -85|78 -85|27 -85|74 -85|63 -85|56 -85|32 -85|77 -85|16 -85|47 -85|64 -85|68 -85|26 -85|29 -85|99 -85|88 -85|14 -85|49 -85|41 -85|76 -64|17 -64|52 -64|27 -64|33 -64|29 -64|55 -64|22 -64|96 -64|91 -64|78 -64|18 -64|26 -64|67 -64|88 -64|56 -64|86 -64|63 -64|87 -64|39 -49|18 -49|27 -49|63 -49|33 -49|16 -49|26 -49|72 -49|87 -49|52 -49|41 -49|75 -49|29 -49|35 -49|17 -49|15 -49|55 -49|91 -49|39 -88|33 -88|27 -88|39 -88|72 -88|35 -88|26 -88|63 -88|17 -88|15 -88|86 -88|91 -88|78 -88|67 -88|94 -88|79 -88|55 -88|52 -33|32 -33|12 -33|93 -33|55 -33|52 -33|94 -33|86 -33|98 -33|83 -33|23 -33|35 -33|72 -33|87 -33|58 -33|73 -33|79 -83|75 -83|29 -83|13 -83|96 -83|49 -83|26 -83|78 -83|14 -83|64 -83|18 -83|56 -83|27 -83|85 -83|74 -83|58 -72|14 -72|95 -72|68 -72|79 -72|98 -72|53 -72|12 -72|96 -72|64 -72|58 -72|57 -72|85 -72|83 -72|73 -57|56 -57|99 -57|13 -57|78 -57|96 -57|29 -57|14 -57|88 -57|23 -57|93 -57|77 -57|83 -57|85 -47|39 -47|91 -47|16 -47|75 -47|67 -47|33 -47|49 -47|22 -47|63 -47|88 -47|87 -47|41 -74|63 -74|67 -74|56 -74|91 -74|33 -74|55 -74|41 -74|75 -74|96 -74|78 -74|68 -56|16 -56|12 -56|87 -56|52 -56|18 -56|39 -56|33 -56|79 -56|78 -56|94 -67|17 -67|94 -67|57 -67|93 -67|53 -67|22 -67|55 -67|52 -67|35 -87|13 -87|77 -87|79 -87|83 -87|58 -87|53 -87|35 -87|95 -12|14 -12|47 -12|83 -12|88 -12|75 -12|95 -12|23 -98|88 -98|49 -98|47 -98|68 -98|76 -98|56 -58|27 -58|29 -58|41 -58|76 -58|64 -32|99 -32|77 -32|64 -32|56 -17|93 -17|79 -17|23 -94|96 -94|58 -22|53 - -49,85,73,74,96,32,76,58,95,57,13,93,14,99,56,47,75 -74,68,64,75,78,18,41,67,15 -83,95,85,32,58,14,76,77,74,68,47,96,49,75,88,56,29,78,18 -91,33,55,17,39,87,52,86,35,72,94,79,12,98,93,53,83,95,85 -12,57,93,23,53,83,95,85,58,14,99,68,64,49,75 -96,27,17,64,78,16,56,63,18,87,33,75,22,88,49,91,67,41,55,39,15,29,47 -83,33,91,98,93,57,15,72,79,95,73,23,52,87,39,22,86 -33,88,27,15,64,63,49,26,87,55,91,22,39,16,29,78,47,41,67,96,17,18,75 -22,33,55,17,39,52,86,94,73,23,53,83,95,85,32 -67,56,39,52,94,33,22,78,27,18,29,35,63,87,86,26,79 -88,68,77,41,33,56,16,74,75,29,47,78,67,63,64,49,18 -41,67,15,91,22,33,55,17,39,86,79,12,98,73,57,93,53 -52,99,23,73,35,72,87,12,77 -85,83,91,23,94,39,33,15,35 -55,35,22,86,56,78,15,39,88,94,87,18,17,52,91 -79,53,85,58,74,68,49 -53,99,79,98,95,12,47,14,64,13,32,85,83,77,23,76,93 -56,29,27,26,16,63,22,17,72,94,79 -49,88,56,29,18,16,63,41,15,33,39,52,35 -33,55,17,39,87,35,72,94,79,12,98,73,57,93,83,95,85,32,13 -67,15,73,33,93,91,12,79,41,57,63,55,22,86,98,35,72,94,16 -86,33,95,72,79,13,39,57,93,87,83,23,53,85,17,98,94,73,12 -87,58,35,94,22,86,72,52,85 -39,52,86,35,94,93,53,83,95,85,32,58,14,99,76 -96,49,75,88,78,27,26,18,16,63,41,67,15,91,22,33,17,87,86 -53,83,14,99,47,96,49 -99,23,98,64,77,57,12,74,47,76,75,96,32,49,68,53,93,13,73,83,95 -15,22,17,39,87,86,35,73,93,53,83,95,85 -33,12,35,86,39,22,17,15,57,87,53,91,98,94,93,95,67,72,73,83,79 -76,77,74,68,47,64,96,49,75,88,56,78,27,26,18,16,63,41,67,15,91,22,33 -99,76,77,74,68,96,49,75,88,56,78,27,26,18,16,63,41,67,15,91,22 -57,75,76,99,64,13,93 -86,35,72,52,23,73,15,53,39,12,55,79,33,93,17,83,67,94,57,22,41,87,98 -14,99,76,77,74,64,75,88,56,26,63 -64,14,99,85,53,98,47,57,83,93,72,77,95,94,73,76,13 -52,35,94,79,12,98,73,57,93,23,53,83,95,85,58,13,14,99,76,77,74 -93,94,99,96,98,85,79,23,58 -64,56,29,18,63,41,67,91,22,55,52 -58,13,14,99,77,74,47,64,96,49,75,88,56,29,78,26,18,63,67 -17,53,22,12,58,93,83 -83,32,77,74,96,78,18 -56,47,58,88,75,49,27,95,26,85,78,99,74,77,68,18,29,76,16,13,32 -56,29,78,18,63,41,67,15,91,22,55,17,39,87,52,35,72,94,79 -16,41,33,55,72,79,73,93,23 -13,76,57,49,95,58,32,23,14,75,77,53,47,85,56,64,96 -93,53,83,58,76,77,68,96,49,75,88,56,78 -35,72,79,12,98,73,93,23,83,95,85,58,14,99,76,77,74,68,47 -88,56,29,78,27,26,18,63,41,67,15,91,22,33,55,17,39,87,52,86,35,72,94 -98,53,32,58,76 -88,56,78,27,26,18,16,41,67,15,91,33,17,39,87,52,86,72,94 -29,96,85,23,56,95,83,76,47,64,78,77,74,49,53,58,75 -53,83,95,85,32,58,13,14,99,76,74,47,49,75,88,56,29,78,27 -55,33,23,79,95,72,85,86,15,73,17,39,52,91,98,93,12 -94,79,12,98,73,93,53,83,95,85,32,14,99,76,68,64,96 -22,55,17,39,87,52,35,72,94,79,12,98,73,57,93,23,95,85,58 -77,74,68,64,96,49,75,88,29,78,27,26,18,16,63,41,67,15,91,33,55 -78,93,76,99,68,96,49 -99,76,74,68,64,27,26,41,22 -18,49,56,29,63,75,68,55,91,27,15 -56,78,27,26,18,16,63,41,67,15,91,33,55,87,52 -64,88,29,18,91,55,17,39,52 -77,74,68,47,64,96,49,75,88,29,78,27,26,18,16,63,67,15,91,22,33 -57,67,73,87,35,95,86 -49,93,68,74,95,32,57,29,64,75,14,13,53,77,96 -74,68,47,64,49,75,88,56,29,78,27,26,18,16,63,41,91,22,33,55,17 -39,52,49,26,22,33,78 -26,63,91,55,17,39,86,72,94,79,57 -94,52,53,87,32,33,57,13,39,85,79,95,35,86,12,23,98 -23,72,14,98,57,64,12,13,93,47,95,68,85,79,73 -26,67,18,39,33,16,78,49,15,56,96,63,75,68,91 -14,63,74,99,64,15,88 -55,16,41,67,49,22,39,56,17,29,63,33,26,68,96 -55,63,67,27,79,78,87,41,56,15,86,22,91,17,18 -22,55,17,39,35,72,94,98,73,93,23,83,58 -73,57,23,53,83,58,13,14,76,47,75 -12,98,73,57,93,23,53,83,85,32,58,13,14,99,76,74,68,47,96,49,75 -39,79,98,57,83,14,76 -53,76,77,68,49,88,56,27,26 -72,57,95,58,13,47,64 -64,88,29,78,26,16,63,15,91,55,17,39,52 -83,95,85,58,13,14,99,76,77,74,68,47,64,96,49,56,78,27,18 -95,85,32,58,13,14,99,76,77,74,47,64,96,49,75,88,56,29,78,27,26,18,16 -64,96,49,75,88,56,29,78,27,26,18,16,63,67,15,22,17,39,52 -22,53,72,23,73,33,63 -12,52,76,95,74,72,73 -73,57,93,23,53,83,95,85,32,58,13,14,99,76,77,74,47,64,96,49,75 -14,83,98,68,75,88,49,93,57,99,85 -17,39,52,35,72,94,79,12,98,73,93,23,53,83,95,58,13,14,99 -16,91,87,22,15,41,88,96,78,17,33,86,26,67,75,29,18,27,49 -18,41,22,33,16,12,91,87,35,72,15,52,93 -78,75,85,76,13,32,56,29,88,93,68,47,49,77,53,58,74,14,96,99,83 -96,85,58,53,77,26,56,13,64,75,99,49,47,88,68,14,83,27,74,78,95,32,76 -35,94,79,73,23,53,83,95,32,58,74 -74,29,17,33,16,64,27,47,75 -35,17,52,91,27,56,18,22,16,39,63 -17,39,35,15,23,22,52,12,94,73,41,93,33,91,98,79,67,86,55,72,87 -55,17,39,87,52,86,35,94,12,98,57,93,23,53,95,32,58 -98,53,99,68,85,83,47,64,76,75,58,95,49,13,96,32,88,57,77 -23,53,32,58,77,74,68,47,96,49,88,56,29,78,27 -91,27,15,41,75,68,67,26,29,56,49,76,14 -76,77,74,68,47,64,75,29,78,27,26,16,63,41,67,15,91,22,33 -27,26,63,15,17,52,35,94,12 -68,49,63,41,15,91,39 -41,67,15,91,33,55,17,39,87,52,35,72,94,79,12,93,23,53,83 -98,93,77,74,13,64,14,68,95,96,83,99,12,94,53,79,85,58,73 -85,88,78,32,99,49,26,64,76 -88,56,29,78,26,16,63,41,67,15,91,33,17,39,87,52,35,72,94 -16,67,56,77,33,91,96,75,29,63,76,15,64,27,78,22,26,49,88,18,41 -68,47,64,96,49,75,56,78,27,26,18,16,63,41,67,15,22,33,55,17,39 -41,15,52,35,72,98,73,57,23,53,83 -53,23,98,47,95 -39,52,67,57,93,15,98,91,17,16,94,55,41,18,73 -17,86,35,79,73,57,53,95,32,58,13,14,99 -26,75,32,49,64,53,47,88,99,77,68,85,96,29,76,14,58 -49,58,63,27,13,32,77,76,26,41,29,99,14 -35,79,83,13,76,68,47 -77,12,99,87,98,32,53 -23,53,95,85,58,13,14,99,77,68,96,75,88,56,29,78,27 -63,13,88,75,96,77,67,47,16,76,74,56,64,14,58 -77,74,68,26,18,67,91 -16,67,91,56,33,29,18,41,17,26,86,78,22,96,52,75,49,39,63,55,27 -41,67,15,91,17,87,52,72,94,79,98,73,57,93,23,53,83 -56,29,78,67,55,87,35,94,79 -14,47,88,63,68,16,27,76,75,32,85,99,18,26,96,49,13,58,29,74,77 -47,95,58,13,98,99,77,64,68,93,12,57,53,85,74,73,72,32,94 -94,93,12,68,14,74,85,98,83,86,32,77,79,57,76,72,73,23,95 -63,41,67,15,55,72,94,79,12,98,73,57,93,23,53 -53,83,95,85,32,58,13,14,99,76,77,68,47,64,96,49,75,88,56,29,78,27,26 -99,76,68,47,64,96,49,75,88,29,78,16,67 -39,15,26,22,94,79,63,35,73,72,18,52,33,57,12,55,16 -63,41,67,15,91,33,55,17,39,86,35,72,94,79,12,98,73,57,93,23,53 -52,86,35,72,98,73,57,83,32,58,14,77,74 -18,16,63,41,67,15,91,22,33,55,39,86,72,94,12,98,73,57,93 -56,96,85,58,13,32,75,23,95,77,14,76,83,53,93,73,68 -93,13,74,58,12,83,35,68,73,86,23,77,53,94,72,98,79,95,57,99,32,14,76 -39,52,94,73,93 -16,63,78,98,52,39,22,87,33 -35,63,16,91,52,86,41,27,73,55,17,12,98,67,33,22,79,39,15 -26,72,55,12,78,52,41,35,63,17,27,94,22,29,67,91,87 -35,16,15,78,72,56,22,26,67,55,18,86,33,88,94,87,41,29,63,39,91,27,17 -52,41,63,49,17,56,87,18,75,16,33,96,64,91,67 -39,53,58,93,57,23,72,83,17,86,94,35,99,85,73,87,12,13,95,98,52 -93,53,83,85,32,58,14,68,49,88,56,29,78 -98,73,57,93,23,53,83,95,85,58,14,99,77,64,96,75,88 -52,86,72,12,98,23,32,58,13,14,76 -78,76,74,96,99,47,41,64,77,32,88 -79,98,57,53,58,74,47,96,49 -13,14,99,76,77,74,68,47,64,96,49,88,56,29,78,27,26,18,16,63,41,67,15 -86,72,22,15,39,33,78,41,87,35,55,94,67,17,12,91,79,29,63 -12,67,93,53,63,55,22,39,23,72,94,35,91,98,79,41,17,57,15 -29,78,27,26,18,16,63,41,67,15,91,22,33,55,39,87,52,86,35,72,94,79,12 -52,86,35,94,79,12,73,57,93,23,53,95,85,32,13,14,99,76,74 -68,64,63,75,56,32,41 -47,75,16,56,67,87,41 -86,35,72,94,79,12,98,73,57,23,53,83,95,85,32,58,13,14,99,76,77,74,68 -56,78,26,18,63,15,35,94,79 -93,23,83,95,85,58,14,99,76,77,74,47,75,88,56,29,78 -91,15,39,29,56,35,41,86,18,87,22,75,52,72,63,17,33,27,55,88,78 -75,88,78,26,67,91,17,87,52 -35,94,98,17,72,32,58,39,95,13,86,73,14,52,83,12,93,53,85,23,79,87,57 -12,73,57,93,23,83,85,32,58,13,14,99,76,77,74,47,96,49,75 -32,74,77,23,99,52,57,35,14,76,95,86,53 -56,99,49,75,27,74,77,63,96,29,47,91,67,22,26,41,88 -64,14,49,77,68,47,78,76,13,27,26 -35,72,79,12,73,57,83,58,14,99,74,68,47 -68,47,64,96,49,75,56,29,78,27,26,63,41,67,15,91,22,33,55,17,39 -17,72,23,22,85,79,87,58,73,12,35,55,86,94,32,95,83,93,98,33,39 -83,68,14,75,77,76,56,18,13 -15,79,35,52,33,16,91,22,41,27,78,63,94,17,98,67,39,18,72,87,55 -95,58,72,13,98,35,79,94,55,86,32,52,57,73,12,17,83 -67,64,75,22,33,56,55,68,49 -63,41,67,15,91,55,17,39,86,72,94,79,98,57,23 -57,93,23,53,83,95,85,32,58,14,99,76,77,74,68,47,64,96,49,75,88,56,29 -32,58,83,85,72,79,73,87,52 -49,75,88,56,29,27,26,18,16,41,67,15,91,22,33,55,17,39,87,52,35 -41,39,98,18,16,91,17,33,87,35,55,79,94,73,27,26,63,12,67,15,52 -91,17,86,41,72,75,88 -91,55,17,52,35,72,12,98,73,57,93,23,53,83,32 -88,78,35,33,52,41,15,91,22,39,67,18,56,94,72,55,87,27,29 -35,72,79,12,98,57,93,23,83,85,32,58,13,14,99,76,77,68,47 -13,74,14,77,83,53,23,47,95,32,96,85,88,56,73,68,57,58,93,76,99 -75,58,88,77,99,13,18,96,49,85,68,47,14,64,74,76,16,78,29,63,56 -13,68,78,53,76,96,47,58,29,32,85,27,88,64,75 -57,83,74,79,32,64,96,13,95,76,14,53,73,85,47,77,98,68,93,94,58,12,99 -17,22,35,86,29,39,55,26,91,33,67,75,87,18,16,27,56 -78,87,17,29,18,86,41,72,79,63,67,26,55,94,35,39,12,22,91,52,27,33,16 -17,87,86,35,72,12,98,73,57,23,53,83,95,85,32,58,13,14,99 -58,13,14,99,76,77,74,68,47,64,96,49,75,88,56,29,78,27,18,16,63,41,67 -16,76,96,88,78,63,68,13,75,49,32,18,27,74,47,64,58,41,26,99,56,29,77 -91,52,41,15,26,72,67,87,18,63,17,73,33 -74,68,47,96,49,75,88,56,29,18,16,63,41,55,17 -64,26,49,13,77,58,85,74,18,78,96,95,32,14,99,83,76 -55,17,39,87,52,35,72,94,79,12,98,73,57,93,23,53,83,95,85,13,14 -39,52,35,72,94,79,73,23,53,83,95,32,13,14,76 -91,55,17,52,86,72,12,73,53,83,32 -99,76,77,74,68,64,96,49,88,56,29,78,26,18,63,41,67,15,91 -22,23,35,67,72,94,16,33,55 -13,14,76,77,74,64,29,27,26,41,15 -12,73,68,96,13,74,76,99,32,14,57,85,53,58,64,47,77,23,49,75,83,98,95 diff --git a/simpletest.sh b/simpletest.sh index ab7231b..1b82759 100755 --- a/simpletest.sh +++ b/simpletest.sh @@ -2,17 +2,52 @@ # Function to show usage usage() { - echo "Usage: $0 [write|validate]" + echo "Usage: $0 [-l] [write|validate]" + echo " -l Use local input files (e.g., day01input.txt)" exit 1 } -# Ensure a mode is provided +# Parse arguments +LOCAL_MODE=0 +while getopts ":l" opt; do + case $opt in + l) LOCAL_MODE=1 ;; + *) usage ;; + esac +done +shift $((OPTIND - 1)) + if [[ $# -ne 1 ]]; then usage fi MODE=$1 +# Function to fetch input +fetch_input() { + local script=$1 + local dayname + dayname=$(basename "$script" .kts | tr 'a-z' 'A-Z') + if [[ $LOCAL_MODE -eq 1 ]]; then + # Fetch input from local files + local input_file="${dayname,,}input.txt" + if [[ -f "$input_file" ]]; then + cat "$input_file" + else + echo "Error: Local input file $input_file not found" >&2 + exit 1 + fi + else + # Fetch input from environment variable + local env_var="${dayname}INPUT" + if [[ -z "${!env_var}" ]]; then + echo "Error: Environment variable $env_var not set" >&2 + exit 1 + fi + echo "${!env_var}" + fi +} + # Write mode if [[ "$MODE" == "write" ]]; then echo "Running in write mode..." @@ -21,7 +56,8 @@ if [[ "$MODE" == "write" ]]; then test_file="${script}.testvalue" echo "Processing $script..." - output=$(kotlin "$script" 2>&1) + input=$(fetch_input "$script") + output=$(echo "$input" | kotlin "$script" 2>&1) if [[ -f "$test_file" ]]; then if [[ "$output" == "$(cat "$test_file")" ]]; then @@ -62,7 +98,8 @@ elif [[ "$MODE" == "validate" ]]; then for test_file in *.kts.testvalue; do script="${test_file%.testvalue}" if [[ -f "$script" ]]; then - output=$(kotlin "$script" 2>&1) + input=$(fetch_input "$script") + output=$(echo "$input" | kotlin "$script" 2>&1) if [[ "$output" == "$(cat "$test_file")" ]]; then echo "PASS: $script" ((pass++))