├── .editorconfig ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── Package.swift ├── README.md ├── Sources ├── AdventDay.swift ├── AdventOfCode.swift ├── Data │ └── Day00.txt └── Day00.swift └── Tests ├── AdventDay.swift └── Day00.swift /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*.swift] 6 | indent_style = space 7 | indent_size = 2 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | xcuserdata/ 5 | DerivedData/ 6 | .swiftpm/configuration/registries.json 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | .netrc 9 | lcov.info 10 | Package.resolved 11 | Sources/Data/Day*.txt 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | By submitting a pull request, you represent that you have the right to license 2 | your contribution to Apple and the community, and agree by submitting the patch 3 | that your contributions are licensed under the [Swift 4 | license](https://swift.org/LICENSE.txt). 5 | 6 | --- 7 | 8 | Before submitting the pull request, please make sure you have [tested your 9 | changes](https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md) 10 | and that they follow the Swift project [guidelines for contributing 11 | code](https://swift.org/contributing/#contributing-code). 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | 204 | 205 | ## Runtime Library Exception to the Apache 2.0 License: ## 206 | 207 | 208 | As an exception, if you use this Software to compile your source code and 209 | portions of this Software are embedded into the binary product as a result, 210 | you may redistribute such product without providing attribution as would 211 | otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 6.0 2 | import PackageDescription 3 | 4 | let dependencies: [Target.Dependency] = [ 5 | .product(name: "Algorithms", package: "swift-algorithms"), 6 | .product(name: "Collections", package: "swift-collections"), 7 | .product(name: "ArgumentParser", package: "swift-argument-parser"), 8 | ] 9 | 10 | let package = Package( 11 | name: "AdventOfCode", 12 | platforms: [.macOS(.v13), .iOS(.v16), .watchOS(.v9), .tvOS(.v16)], 13 | dependencies: [ 14 | .package( 15 | url: "https://github.com/apple/swift-algorithms.git", 16 | .upToNextMajor(from: "1.2.0")), 17 | .package( 18 | url: "https://github.com/apple/swift-collections.git", 19 | .upToNextMajor(from: "1.1.4")), 20 | .package( 21 | url: "https://github.com/apple/swift-argument-parser.git", 22 | .upToNextMajor(from: "1.5.0")), 23 | .package( 24 | url: "https://github.com/swiftlang/swift-format.git", 25 | .upToNextMajor(from: "600.0.0")) 26 | ], 27 | targets: [ 28 | .executableTarget( 29 | name: "AdventOfCode", 30 | dependencies: dependencies, 31 | resources: [.copy("Data")] 32 | ), 33 | .testTarget( 34 | name: "AdventOfCodeTests", 35 | dependencies: ["AdventOfCode"] + dependencies 36 | ) 37 | ], 38 | swiftLanguageModes: [.v6] 39 | ) 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Advent of Code Swift Starter Project 2 | 3 | [![Language](https://img.shields.io/badge/language-Swift-red.svg)](https://swift.org) 4 | 5 | Daily programming puzzles at [Advent of Code](), by 6 | [Eric Wastl](). This is a small example starter project for 7 | building Advent of Code solutions. 8 | 9 | ## Usage 10 | 11 | Swift comes with Xcode, or you can [install it](https://www.swift.org/install/) 12 | on a supported macOS, Linux, or Windows platform. 13 | 14 | If you're using Xcode, you can open this project by choosing File / Open and 15 | select the parent directory. 16 | 17 | If you prefer the command line, you can run the test suite with `swift test`, 18 | and run the output with `swift run`. 19 | 20 | If you're using Visual Studio Code to edit, you might find these Swift 21 | extensions useful: 22 | 23 | - [Swift](https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang) 24 | (provides core language edit / debug / test features) 25 | - [apple-swift-format](https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-apple-swift-format) 26 | (supports the [swift-format](https://github.com/apple/swift-format) package) 27 | 28 | ## Challenges 29 | 30 | The challenges assume three files (replace 00 with the day of the challenge). 31 | 32 | - `Sources/Data/Day00.txt`: the input data provided for the challenge 33 | - `Sources/Day00.swift`: the code to solve the challenge 34 | - `Tests/Day00.swift`: any unit tests that you want to include 35 | 36 | To start a new day's challenge, make a copy of these files, updating 00 to the 37 | day number. 38 | 39 | ```diff 40 | // Add each new day implementation to this array: 41 | let allChallenges: [any AdventDay] = [ 42 | - Day00() 43 | + Day00(), 44 | + Day01(), 45 | ] 46 | ``` 47 | 48 | Then implement part 1 and 2. The `AdventOfCode.swift` file controls which challenge 49 | is run with `swift run`. Add your new type to its `allChallenges` array. By default 50 | it runs the most recent challenge. 51 | 52 | The `AdventOfCode.swift` file controls which day's challenge is run 53 | with `swift run`. By default that runs the most recent challenge in the package. 54 | 55 | To supply command line arguments use `swift run AdventOfCode`. For example, 56 | `swift run -c release AdventOfCode --benchmark 3` builds the binary with full 57 | optimizations, and benchmarks the challenge for day 3. 58 | 59 | ## Linting and Formatting 60 | 61 | Challenge source code can be linted and formatted automatically using the 62 | included dependency on `swift-format`. 63 | 64 | Lint source code with the following command: 65 | 66 | ```shell 67 | $ swift package lint-source-code 68 | ``` 69 | 70 | Format source code with the following command: 71 | 72 | ```shell 73 | $ swift package format-source-code 74 | Plugin ‘Format Source Code’ wants permission to write to the package directory. 75 | Stated reason: “This command formats the Swift source files”. 76 | Allow this plugin to write to the package directory? (yes/no) 77 | ``` 78 | 79 | To avoid the interactive prompt when formatting source code, use the 80 | `--allow-writing-to-package-directory` flag. 81 | 82 | ```shell 83 | $ swift package format-source-code --allow-writing-to-package-directory 84 | ``` 85 | 86 | swift-format will use the built-in default style to lint and format code. A 87 | `.swift-format` configuration file can be used to customize the style used, see 88 | [Configuration](https://github.com/apple/swift-format/blob/main/Documentation/Configuration.md) 89 | for more details. 90 | -------------------------------------------------------------------------------- /Sources/AdventDay.swift: -------------------------------------------------------------------------------- 1 | @_exported import Algorithms 2 | @_exported import Collections 3 | import Foundation 4 | 5 | protocol AdventDay: Sendable { 6 | associatedtype Answer = Int 7 | 8 | /// The day of the Advent of Code challenge. 9 | /// 10 | /// You can implement this property, or, if your type is named with the 11 | /// day number as its suffix (like `Day01`), it is derived automatically. 12 | static var day: Int { get } 13 | 14 | /// An initializer that uses the provided test data. 15 | init(data: String) 16 | 17 | /// Computes and returns the answer for part one. 18 | func part1() async throws -> Answer 19 | 20 | /// Computes and returns the answer for part two. 21 | func part2() async throws -> Answer 22 | } 23 | 24 | struct PartUnimplemented: Error { 25 | let day: Int 26 | let part: Int 27 | } 28 | 29 | extension AdventDay { 30 | // Find the challenge day from the type name. 31 | static var day: Int { 32 | let typeName = String(reflecting: Self.self) 33 | guard let i = typeName.lastIndex(where: { !$0.isNumber }), 34 | let day = Int(typeName[i...].dropFirst()) 35 | else { 36 | fatalError( 37 | """ 38 | Day number not found in type name: \ 39 | implement the static `day` property \ 40 | or use the day number as your type's suffix (like `Day3`).") 41 | """) 42 | } 43 | return day 44 | } 45 | 46 | var day: Int { 47 | Self.day 48 | } 49 | 50 | // Default implementation of `part2`, so there aren't interruptions before 51 | // working on `part1()`. 52 | func part2() throws -> Answer { 53 | throw PartUnimplemented(day: day, part: 2) 54 | } 55 | 56 | /// An initializer that loads the test data from the corresponding data file. 57 | init() { 58 | self.init(data: Self.loadData(challengeDay: Self.day)) 59 | } 60 | 61 | static func loadData(challengeDay: Int) -> String { 62 | let dayString = String(format: "%02d", challengeDay) 63 | let dataFilename = "Day\(dayString)" 64 | let dataURL = Bundle.module.url( 65 | forResource: dataFilename, 66 | withExtension: "txt", 67 | subdirectory: "Data") 68 | 69 | guard let dataURL, 70 | let data = try? String(contentsOf: dataURL, encoding: .utf8) 71 | else { 72 | fatalError("Couldn't find file '\(dataFilename).txt' in the 'Data' directory.") 73 | } 74 | 75 | // On Windows, line separators may be CRLF. Converting to LF so that \n 76 | // works for string parsing. 77 | return data.replacingOccurrences(of: "\r", with: "") 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Sources/AdventOfCode.swift: -------------------------------------------------------------------------------- 1 | import ArgumentParser 2 | 3 | // Add each new day implementation to this array: 4 | let allChallenges: [any AdventDay] = [ 5 | Day00() 6 | ] 7 | 8 | @main 9 | struct AdventOfCode: AsyncParsableCommand { 10 | @Argument(help: "The day of the challenge. For December 1st, use '1'.") 11 | var day: Int? 12 | 13 | @Flag(help: "Benchmark the time taken by the solution") 14 | var benchmark: Bool = false 15 | 16 | @Flag(help: "Run all the days available") 17 | var all: Bool = false 18 | 19 | /// The selected day, or the latest day if no selection is provided. 20 | var selectedChallenge: any AdventDay { 21 | get throws { 22 | if let day { 23 | if let challenge = allChallenges.first(where: { $0.day == day }) { 24 | return challenge 25 | } else { 26 | throw ValidationError("No solution found for day \(day)") 27 | } 28 | } else { 29 | return latestChallenge 30 | } 31 | } 32 | } 33 | 34 | /// The latest challenge in `allChallenges`. 35 | var latestChallenge: any AdventDay { 36 | allChallenges.max(by: { $0.day < $1.day })! 37 | } 38 | 39 | func run(part: () async throws -> T, named: String) async -> Duration { 40 | var result: Result? 41 | let timing = await ContinuousClock().measure { 42 | do { 43 | result = .success(try await part()) 44 | } catch { 45 | result = .failure(error) 46 | } 47 | } 48 | switch result! { 49 | case .success(let success): 50 | print("\(named): \(success)") 51 | case .failure(let failure as PartUnimplemented): 52 | print("Day \(failure.day) part \(failure.part) unimplemented") 53 | case .failure(let failure): 54 | print("\(named): Failed with error: \(failure)") 55 | } 56 | return timing 57 | } 58 | 59 | func run() async throws { 60 | let challenges = 61 | if all { 62 | allChallenges 63 | } else { 64 | try [selectedChallenge] 65 | } 66 | 67 | for challenge in challenges { 68 | print("Executing Advent of Code challenge \(challenge.day)...") 69 | 70 | let timing1 = await run(part: challenge.part1, named: "Part 1") 71 | let timing2 = await run(part: challenge.part2, named: "Part 2") 72 | 73 | if benchmark { 74 | print("Part 1 took \(timing1), part 2 took \(timing2).") 75 | #if DEBUG 76 | print("Looks like you're benchmarking debug code. Try swift run -c release") 77 | #endif 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Sources/Data/Day00.txt: -------------------------------------------------------------------------------- 1 | 4514 2 | 8009 3 | 6703 4 | 1811 5 | 4881 6 | 3905 7 | 3933 8 | 9436 9 | 4332 10 | 11 | 3059 12 | 15715 13 | 11597 14 | 10625 15 | 8486 16 | 17 | 4556 18 | 10613 19 | 4087 20 | 11287 21 | 12020 22 | 1412 23 | 24 | 5320 25 | 9757 26 | 10646 27 | 7373 28 | 1197 29 | 3486 30 | 4359 31 | 32 | 16319 33 | 22687 34 | 5272 35 | 36 | 6167 37 | 2478 38 | 4950 39 | 5513 40 | 6113 41 | 2739 42 | 6805 43 | 4488 44 | 6555 45 | 2752 46 | 47 | 2198 48 | 2528 49 | 3432 50 | 2218 51 | 3283 52 | 1400 53 | 1932 54 | 3438 55 | 1834 56 | 1050 57 | 4766 58 | 5218 59 | 3033 60 | 3410 61 | 62 | 3362 63 | 2773 64 | 6782 65 | 7416 66 | 5388 67 | 5419 68 | 4628 69 | 8877 70 | 71 | 2852 72 | 7531 73 | 6028 74 | 8068 75 | 3942 76 | 9388 77 | 8053 78 | 6334 79 | 6099 80 | 81 | 2086 82 | 3097 83 | 2914 84 | 3087 85 | 7500 86 | 1718 87 | 1482 88 | 6198 89 | 2057 90 | 7098 91 | 7464 92 | 93 | 4522 94 | 4306 95 | 1906 96 | 6692 97 | 1273 98 | 3851 99 | 6475 100 | 1186 101 | 6012 102 | 2456 103 | 2414 104 | 5740 105 | 106 | 12352 107 | 14613 108 | 4339 109 | 1259 110 | 3363 111 | 112 | 5505 113 | 5913 114 | 6539 115 | 4164 116 | 10864 117 | 8085 118 | 4962 119 | 120 | 5427 121 | 3232 122 | 6945 123 | 4536 124 | 6549 125 | 2299 126 | 4450 127 | 2130 128 | 3757 129 | 130 | 8546 131 | 3303 132 | 9097 133 | 2356 134 | 3155 135 | 1122 136 | 6978 137 | 3389 138 | 139 | 55471 140 | 141 | 3774 142 | 7631 143 | 2208 144 | 11171 145 | 5316 146 | 1342 147 | 5328 148 | 149 | 10879 150 | 9002 151 | 11257 152 | 3581 153 | 7878 154 | 10258 155 | 156 | 2577 157 | 1797 158 | 5983 159 | 11497 160 | 3851 161 | 162 | 4420 163 | 5333 164 | 4281 165 | 6978 166 | 2230 167 | 2658 168 | 4337 169 | 3238 170 | 7724 171 | 7813 172 | 7326 173 | 174 | 1907 175 | 1190 176 | 6038 177 | 6109 178 | 4484 179 | 5432 180 | 6124 181 | 7755 182 | 8056 183 | 7040 184 | 185 | 1782 186 | 1645 187 | 6918 188 | 3525 189 | 2147 190 | 6923 191 | 7008 192 | 9695 193 | 194 | 3026 195 | 5366 196 | 2607 197 | 6065 198 | 3997 199 | 2859 200 | 2836 201 | 5214 202 | 5599 203 | 3201 204 | 3666 205 | 1140 206 | 4597 207 | 5899 208 | 4111 209 | 210 | 9757 211 | 25752 212 | 21486 213 | 214 | 16745 215 | 216 | 3571 217 | 8001 218 | 7104 219 | 4253 220 | 1833 221 | 1393 222 | 6105 223 | 2036 224 | 7697 225 | 1066 226 | 6702 227 | 228 | 2358 229 | 4265 230 | 1826 231 | 5129 232 | 1598 233 | 1630 234 | 3271 235 | 2349 236 | 5261 237 | 3496 238 | 4495 239 | 6875 240 | 3404 241 | 242 | 13904 243 | 4223 244 | 10247 245 | 3708 246 | 247 | 8961 248 | 13101 249 | 6896 250 | 11053 251 | 6335 252 | 11459 253 | 254 | 3948 255 | 4739 256 | 4888 257 | 5918 258 | 6229 259 | 5056 260 | 3039 261 | 1030 262 | 4181 263 | 1801 264 | 3716 265 | 2410 266 | 6056 267 | 4574 268 | 269 | 5960 270 | 8186 271 | 3660 272 | 3278 273 | 3355 274 | 1016 275 | 6297 276 | 6688 277 | 7784 278 | 4939 279 | 280 | 5957 281 | 2549 282 | 3045 283 | 8425 284 | 6900 285 | 7677 286 | 1393 287 | 7579 288 | 3975 289 | 2936 290 | 291 | 3063 292 | 5296 293 | 3958 294 | 5551 295 | 3848 296 | 3588 297 | 3143 298 | 1488 299 | 3876 300 | 7298 301 | 3819 302 | 2234 303 | 304 | 6478 305 | 5440 306 | 3993 307 | 7207 308 | 6141 309 | 7936 310 | 2209 311 | 1456 312 | 6417 313 | 5250 314 | 7690 315 | 316 | 5275 317 | 11944 318 | 2501 319 | 4200 320 | 11512 321 | 13862 322 | 323 | 2941 324 | 3403 325 | 5950 326 | 8661 327 | 1801 328 | 2843 329 | 5444 330 | 7960 331 | 4143 332 | 8379 333 | 334 | 6659 335 | 5257 336 | 2225 337 | 5243 338 | 4003 339 | 2186 340 | 5857 341 | 3417 342 | 1960 343 | 3984 344 | 4876 345 | 1728 346 | 347 | 2105 348 | 4101 349 | 4754 350 | 5537 351 | 4265 352 | 4678 353 | 2571 354 | 7662 355 | 3726 356 | 7258 357 | 3696 358 | 359 | 16882 360 | 7724 361 | 3065 362 | 5176 363 | 364 | 1721 365 | 3594 366 | 5892 367 | 2019 368 | 6036 369 | 5556 370 | 4327 371 | 3334 372 | 1035 373 | 6942 374 | 4931 375 | 4084 376 | 4900 377 | 378 | 10773 379 | 10294 380 | 7417 381 | 1277 382 | 9771 383 | 8885 384 | 6845 385 | 386 | 5226 387 | 388 | 9212 389 | 2019 390 | 2943 391 | 11833 392 | 13491 393 | 394 | 4581 395 | 5217 396 | 4441 397 | 2337 398 | 7312 399 | 5529 400 | 2051 401 | 2388 402 | 5011 403 | 4581 404 | 6601 405 | 406 | 3491 407 | 3984 408 | 4322 409 | 5689 410 | 2555 411 | 1377 412 | 5654 413 | 6410 414 | 4639 415 | 5354 416 | 3402 417 | 4174 418 | 2210 419 | 3610 420 | 421 | 4130 422 | 3186 423 | 6120 424 | 1344 425 | 8012 426 | 4477 427 | 5849 428 | 7346 429 | 7418 430 | 3218 431 | 7778 432 | 433 | 10429 434 | 14053 435 | 10551 436 | 8502 437 | 1986 438 | 439 | 7470 440 | 7166 441 | 11309 442 | 5186 443 | 444 | 8940 445 | 10132 446 | 19723 447 | 15079 448 | 449 | 6791 450 | 5344 451 | 2331 452 | 2805 453 | 7742 454 | 455 | 2569 456 | 7224 457 | 5140 458 | 3158 459 | 5542 460 | 2395 461 | 2265 462 | 2922 463 | 5806 464 | 6338 465 | 6020 466 | 3443 467 | 468 | 14741 469 | 4547 470 | 1076 471 | 4543 472 | 10298 473 | 474 | 2753 475 | 4049 476 | 6701 477 | 2333 478 | 2433 479 | 4979 480 | 5514 481 | 3981 482 | 6046 483 | 2043 484 | 6719 485 | 3367 486 | 6532 487 | 488 | 6962 489 | 2222 490 | 5696 491 | 7206 492 | 5679 493 | 4041 494 | 3633 495 | 1043 496 | 1466 497 | 7205 498 | 4116 499 | 500 | 10280 501 | 17862 502 | 17944 503 | 504 | 8670 505 | 5423 506 | 3849 507 | 2444 508 | 5010 509 | 5564 510 | 7740 511 | 4000 512 | 7893 513 | 1137 514 | 515 | 10887 516 | 16819 517 | 7692 518 | 519 | 4397 520 | 12537 521 | 11166 522 | 1875 523 | 10936 524 | 525 | 6103 526 | 6781 527 | 5699 528 | 1667 529 | 6727 530 | 2974 531 | 5056 532 | 3145 533 | 6834 534 | 4884 535 | 6476 536 | 2464 537 | 2679 538 | 539 | 15428 540 | 9750 541 | 24018 542 | 543 | 2093 544 | 3411 545 | 4917 546 | 2102 547 | 3586 548 | 5310 549 | 2243 550 | 4541 551 | 4379 552 | 5443 553 | 6747 554 | 3656 555 | 1647 556 | 557 | 21030 558 | 559 | 2750 560 | 5391 561 | 1101 562 | 5197 563 | 2594 564 | 5370 565 | 4769 566 | 5508 567 | 3809 568 | 1349 569 | 5034 570 | 1757 571 | 572 | 7071 573 | 19487 574 | 9131 575 | 576 | 9010 577 | 6017 578 | 11580 579 | 10571 580 | 3779 581 | 3131 582 | 583 | 65413 584 | 585 | 1043 586 | 9178 587 | 8975 588 | 1666 589 | 8470 590 | 2231 591 | 8461 592 | 8254 593 | 2384 594 | 595 | 7499 596 | 2336 597 | 4819 598 | 6472 599 | 2467 600 | 2726 601 | 6179 602 | 7218 603 | 3422 604 | 6760 605 | 606 | 21611 607 | 4384 608 | 15789 609 | 610 | 13272 611 | 1281 612 | 4032 613 | 12189 614 | 3263 615 | 2092 616 | 617 | 18944 618 | 22554 619 | 620 | 47475 621 | 622 | 11288 623 | 12498 624 | 5455 625 | 8375 626 | 15372 627 | 628 | 3279 629 | 7755 630 | 8865 631 | 8027 632 | 2351 633 | 2164 634 | 6867 635 | 3546 636 | 637 | 2579 638 | 2302 639 | 5728 640 | 1820 641 | 5623 642 | 4980 643 | 1335 644 | 6355 645 | 5561 646 | 6707 647 | 3067 648 | 3355 649 | 5091 650 | 651 | 9430 652 | 2156 653 | 5053 654 | 4895 655 | 4751 656 | 6864 657 | 9518 658 | 7626 659 | 5000 660 | 661 | 7678 662 | 4309 663 | 2919 664 | 8319 665 | 7905 666 | 1656 667 | 6704 668 | 7666 669 | 5962 670 | 671 | 9153 672 | 1759 673 | 1344 674 | 8101 675 | 3844 676 | 9197 677 | 5987 678 | 679 | 19110 680 | 9492 681 | 13663 682 | 5459 683 | 684 | 4112 685 | 1162 686 | 3983 687 | 5407 688 | 3246 689 | 2129 690 | 1940 691 | 3455 692 | 6758 693 | 2091 694 | 3272 695 | 2441 696 | 2344 697 | 698 | 3735 699 | 3057 700 | 6874 701 | 4785 702 | 6497 703 | 5610 704 | 2273 705 | 6636 706 | 2762 707 | 4467 708 | 2209 709 | 7048 710 | 711 | 2947 712 | 4945 713 | 6535 714 | 8432 715 | 9028 716 | 5316 717 | 8208 718 | 3277 719 | 720 | 3333 721 | 6548 722 | 4928 723 | 1360 724 | 1432 725 | 5972 726 | 4575 727 | 4121 728 | 6787 729 | 6775 730 | 5400 731 | 5156 732 | 733 | 33497 734 | 735 | 4871 736 | 5442 737 | 6829 738 | 2711 739 | 7851 740 | 5936 741 | 4290 742 | 3963 743 | 1208 744 | 6115 745 | 3705 746 | 747 | 8801 748 | 1239 749 | 9742 750 | 7859 751 | 4868 752 | 6162 753 | 3990 754 | 2116 755 | 756 | 3147 757 | 5970 758 | 1028 759 | 2024 760 | 1904 761 | 5983 762 | 1455 763 | 1935 764 | 6031 765 | 4448 766 | 4915 767 | 3576 768 | 5433 769 | 4070 770 | 771 | 5581 772 | 6684 773 | 2338 774 | 6998 775 | 3365 776 | 5190 777 | 5551 778 | 6858 779 | 7120 780 | 5143 781 | 1078 782 | 1636 783 | 784 | 1765 785 | 8124 786 | 3621 787 | 5502 788 | 3924 789 | 7906 790 | 6155 791 | 5973 792 | 6596 793 | 8697 794 | 795 | 30733 796 | 19954 797 | 798 | 1227 799 | 7285 800 | 8294 801 | 6285 802 | 2505 803 | 7283 804 | 3286 805 | 4547 806 | 5292 807 | 808 | 4767 809 | 1039 810 | 3045 811 | 4567 812 | 5790 813 | 1224 814 | 6805 815 | 3689 816 | 3941 817 | 2191 818 | 2509 819 | 1020 820 | 3261 821 | 822 | 1212 823 | 2241 824 | 2926 825 | 5704 826 | 4259 827 | 2251 828 | 2437 829 | 3531 830 | 3456 831 | 5574 832 | 4056 833 | 6020 834 | 2898 835 | 5057 836 | 1712 837 | 838 | 4532 839 | 5547 840 | 2323 841 | 10119 842 | 4161 843 | 4809 844 | 8820 845 | 7200 846 | 847 | 7563 848 | 2845 849 | 1564 850 | 7468 851 | 3533 852 | 8051 853 | 6130 854 | 7713 855 | 6149 856 | 4930 857 | 5070 858 | 859 | 6145 860 | 5654 861 | 4039 862 | 5029 863 | 3369 864 | 1330 865 | 1739 866 | 3554 867 | 2637 868 | 6281 869 | 4225 870 | 1559 871 | 2998 872 | 2723 873 | 874 | 46446 875 | 876 | 8785 877 | 1461 878 | 11831 879 | 4977 880 | 8704 881 | 882 | 5982 883 | 7195 884 | 2298 885 | 6440 886 | 4355 887 | 7439 888 | 6837 889 | 1879 890 | 5288 891 | 3602 892 | 4337 893 | 894 | 4272 895 | 12891 896 | 6936 897 | 11964 898 | 4734 899 | 4828 900 | 901 | 1052 902 | 5579 903 | 5328 904 | 1640 905 | 5256 906 | 1318 907 | 1956 908 | 6453 909 | 6553 910 | 5963 911 | 2472 912 | 2892 913 | 3800 914 | 915 | 2898 916 | 6365 917 | 1775 918 | 7440 919 | 5182 920 | 2004 921 | 4704 922 | 3905 923 | 7436 924 | 3530 925 | 3931 926 | 927 | 4344 928 | 4992 929 | 3707 930 | 2214 931 | 3295 932 | 4764 933 | 2093 934 | 1942 935 | 6040 936 | 2393 937 | 2269 938 | 4681 939 | 6905 940 | 941 | 1051 942 | 4442 943 | 1254 944 | 5438 945 | 4390 946 | 3861 947 | 1951 948 | 4766 949 | 5814 950 | 6431 951 | 1181 952 | 2224 953 | 5036 954 | 1744 955 | 956 | 3493 957 | 5462 958 | 1194 959 | 3328 960 | 3332 961 | 6818 962 | 5102 963 | 6050 964 | 1621 965 | 3951 966 | 5062 967 | 1546 968 | 4304 969 | 970 | 16366 971 | 17043 972 | 12935 973 | 9439 974 | 975 | 8140 976 | 1185 977 | 8723 978 | 3441 979 | 1914 980 | 6665 981 | 3641 982 | 1010 983 | 5197 984 | 5249 985 | 986 | 4795 987 | 19775 988 | 1502 989 | 9970 990 | 991 | 14246 992 | 11998 993 | 12677 994 | 5554 995 | 996 | 6733 997 | 6173 998 | 4063 999 | 2994 1000 | 4069 1001 | 4907 1002 | 3381 1003 | 5065 1004 | 3066 1005 | 1006 | 54029 1007 | 1008 | 6782 1009 | 5629 1010 | 3154 1011 | 6967 1012 | 11148 1013 | 8169 1014 | 4309 1015 | 1016 | 4985 1017 | 2096 1018 | 4220 1019 | 6338 1020 | 2578 1021 | 6504 1022 | 4693 1023 | 2296 1024 | 6020 1025 | 1914 1026 | 1027 | 12080 1028 | 7332 1029 | 1030 | 4018 1031 | 5543 1032 | 1011 1033 | 5775 1034 | 2445 1035 | 4643 1036 | 2569 1037 | 4049 1038 | 3815 1039 | 7059 1040 | 1041 | 2221 1042 | 5799 1043 | 2865 1044 | 3002 1045 | 5123 1046 | 4587 1047 | 2616 1048 | 2486 1049 | 6544 1050 | 3510 1051 | 2072 1052 | 5583 1053 | 1202 1054 | 1055 | 20977 1056 | 1057 | 3908 1058 | 1548 1059 | 3974 1060 | 3030 1061 | 6060 1062 | 5685 1063 | 3743 1064 | 3660 1065 | 3953 1066 | 3097 1067 | 2451 1068 | 5463 1069 | 4462 1070 | 4164 1071 | 2274 1072 | 1073 | 3237 1074 | 4155 1075 | 3878 1076 | 7280 1077 | 6806 1078 | 6805 1079 | 7709 1080 | 5390 1081 | 4532 1082 | 3508 1083 | 1084 | 13465 1085 | 10177 1086 | 12174 1087 | 6555 1088 | 1931 1089 | 13866 1090 | 1091 | 1512 1092 | 3659 1093 | 5765 1094 | 2869 1095 | 6385 1096 | 4182 1097 | 5526 1098 | 2050 1099 | 4933 1100 | 5630 1101 | 3493 1102 | 5995 1103 | 1425 1104 | 1105 | 4335 1106 | 8051 1107 | 6448 1108 | 6574 1109 | 2379 1110 | 2517 1111 | 1438 1112 | 4618 1113 | 4844 1114 | 7733 1115 | 7984 1116 | 1117 | 1932 1118 | 2692 1119 | 1778 1120 | 2317 1121 | 2987 1122 | 2215 1123 | 4493 1124 | 5474 1125 | 1650 1126 | 4271 1127 | 4190 1128 | 1644 1129 | 5670 1130 | 4252 1131 | 5986 1132 | 1133 | 33522 1134 | 20921 1135 | 1136 | 5651 1137 | 4826 1138 | 1265 1139 | 10823 1140 | 3532 1141 | 1639 1142 | 2232 1143 | 1144 | 2727 1145 | 3843 1146 | 4970 1147 | 4981 1148 | 1783 1149 | 6192 1150 | 5106 1151 | 1152 | 12982 1153 | 10479 1154 | 16306 1155 | 13041 1156 | 13679 1157 | 1158 | 4778 1159 | 2726 1160 | 1427 1161 | 6216 1162 | 5710 1163 | 6500 1164 | 5576 1165 | 4088 1166 | 5634 1167 | 4158 1168 | 4877 1169 | 2578 1170 | 1648 1171 | 1329 1172 | 1173 | 5413 1174 | 7572 1175 | 2190 1176 | 7615 1177 | 3608 1178 | 7678 1179 | 3041 1180 | 3741 1181 | 6610 1182 | 6334 1183 | 1904 1184 | 1185 | 8421 1186 | 5311 1187 | 6287 1188 | 9371 1189 | 5937 1190 | 2671 1191 | 2911 1192 | 1193 | 18350 1194 | 1195 | 4656 1196 | 2569 1197 | 1655 1198 | 4154 1199 | 3594 1200 | 6325 1201 | 1829 1202 | 3426 1203 | 3380 1204 | 2482 1205 | 6305 1206 | 5656 1207 | 1208 | 5623 1209 | 17111 1210 | 20624 1211 | 1212 | 6359 1213 | 1958 1214 | 6109 1215 | 6287 1216 | 10371 1217 | 9097 1218 | 5626 1219 | 10542 1220 | 1221 | 12287 1222 | 7358 1223 | 12173 1224 | 15289 1225 | 1312 1226 | 1227 | 9307 1228 | 12837 1229 | 7109 1230 | 3993 1231 | 13645 1232 | 9731 1233 | 1234 | 4890 1235 | 5584 1236 | 5799 1237 | 5199 1238 | 1682 1239 | 3814 1240 | 2759 1241 | 2885 1242 | 4446 1243 | 4133 1244 | 6358 1245 | 5576 1246 | 5748 1247 | 1337 1248 | 1249 | 3017 1250 | 4273 1251 | 9032 1252 | 6029 1253 | 4492 1254 | 5168 1255 | 9962 1256 | 7038 1257 | 1258 | 11137 1259 | 12665 1260 | 1261 | 21501 1262 | 32719 1263 | 1264 | 4835 1265 | 4078 1266 | 7345 1267 | 7417 1268 | 5831 1269 | 9642 1270 | 7545 1271 | 5471 1272 | 2139 1273 | 1274 | 1508 1275 | 1647 1276 | 8202 1277 | 6437 1278 | 10415 1279 | 9614 1280 | 1551 1281 | 2297 1282 | 1283 | 10258 1284 | 17370 1285 | 7027 1286 | 1287 | 2258 1288 | 10853 1289 | 14703 1290 | 3899 1291 | 1292 | 13138 1293 | 18278 1294 | 11380 1295 | 11330 1296 | 1297 | 5362 1298 | 12051 1299 | 8062 1300 | 11651 1301 | 15184 1302 | 1303 | 7649 1304 | 9430 1305 | 5594 1306 | 4730 1307 | 4759 1308 | 5352 1309 | 11025 1310 | 1311 | 1001 1312 | 2798 1313 | 13426 1314 | 11713 1315 | 2081 1316 | 13053 1317 | 1318 | 4407 1319 | 1829 1320 | 3318 1321 | 1176 1322 | 3629 1323 | 5444 1324 | 3213 1325 | 6697 1326 | 5679 1327 | 6891 1328 | 3961 1329 | 6360 1330 | 1441 1331 | 1332 | 7428 1333 | 15180 1334 | 14117 1335 | 1510 1336 | 12963 1337 | 1338 | 3321 1339 | 3320 1340 | 2099 1341 | 2471 1342 | 3159 1343 | 1508 1344 | 1542 1345 | 4700 1346 | 4859 1347 | 1510 1348 | 5183 1349 | 2905 1350 | 1609 1351 | 5611 1352 | 3370 1353 | 1354 | 8936 1355 | 18333 1356 | 18055 1357 | 9369 1358 | 1359 | 7383 1360 | 6409 1361 | 1184 1362 | 6878 1363 | 7108 1364 | 2568 1365 | 5374 1366 | 7258 1367 | 5462 1368 | 7207 1369 | 2211 1370 | 6164 1371 | 1372 | 3675 1373 | 1118 1374 | 6252 1375 | 4861 1376 | 6231 1377 | 2161 1378 | 5556 1379 | 4454 1380 | 5419 1381 | 2729 1382 | 5963 1383 | 3351 1384 | 3544 1385 | 1386 | 2060 1387 | 7574 1388 | 6969 1389 | 2968 1390 | 4316 1391 | 5487 1392 | 2261 1393 | 1375 1394 | 1796 1395 | 7321 1396 | 1397 | 2708 1398 | 10030 1399 | 4543 1400 | 2573 1401 | 4708 1402 | 1342 1403 | 10369 1404 | 10452 1405 | 1406 | 25141 1407 | 19156 1408 | 10265 1409 | 1410 | 2291 1411 | 3072 1412 | 6329 1413 | 6608 1414 | 6437 1415 | 2654 1416 | 5965 1417 | 1873 1418 | 6091 1419 | 6377 1420 | 3098 1421 | 3708 1422 | 3983 1423 | 1424 | 3047 1425 | 8364 1426 | 4720 1427 | 1678 1428 | 1720 1429 | 8052 1430 | 6597 1431 | 2818 1432 | 7694 1433 | 7541 1434 | 1435 | 7453 1436 | 7491 1437 | 5792 1438 | 4864 1439 | 1486 1440 | 2471 1441 | 7657 1442 | 5603 1443 | 3222 1444 | 5398 1445 | 4459 1446 | 1447 | 3768 1448 | 3173 1449 | 1690 1450 | 2872 1451 | 4294 1452 | 5843 1453 | 5425 1454 | 5110 1455 | 1988 1456 | 1660 1457 | 6431 1458 | 3632 1459 | 4896 1460 | 2094 1461 | 1462 | 2685 1463 | 6829 1464 | 6302 1465 | 1294 1466 | 5920 1467 | 6517 1468 | 6218 1469 | 4705 1470 | 4098 1471 | 6474 1472 | 2341 1473 | 1907 1474 | 1475 | 5531 1476 | 23363 1477 | 22143 1478 | 1479 | 17140 1480 | 13864 1481 | 7305 1482 | 13004 1483 | 1484 | 1924 1485 | 2874 1486 | 1231 1487 | 4930 1488 | 2131 1489 | 3807 1490 | 5767 1491 | 5536 1492 | 1716 1493 | 1084 1494 | 2675 1495 | 3694 1496 | 3267 1497 | 2248 1498 | 2655 1499 | 1500 | 9692 1501 | 2588 1502 | 6897 1503 | 10903 1504 | 2978 1505 | 1506 | 3149 1507 | 8346 1508 | 3871 1509 | 1283 1510 | 3229 1511 | 7102 1512 | 6218 1513 | 8464 1514 | 6478 1515 | 6861 1516 | 1517 | 5967 1518 | 3879 1519 | 2451 1520 | 3677 1521 | 4833 1522 | 3397 1523 | 5966 1524 | 2456 1525 | 3384 1526 | 6944 1527 | 5076 1528 | 1529 | 14894 1530 | 18504 1531 | 14068 1532 | 1686 1533 | 1534 | 3125 1535 | 1927 1536 | 1998 1537 | 5447 1538 | 1736 1539 | 4314 1540 | 3658 1541 | 3604 1542 | 3974 1543 | 2081 1544 | 5045 1545 | 3374 1546 | 3999 1547 | 2334 1548 | 1141 1549 | 1550 | 7064 1551 | 13794 1552 | 1553 | 9500 1554 | 2963 1555 | 2683 1556 | 7601 1557 | 5231 1558 | 1168 1559 | 6598 1560 | 8435 1561 | 4459 1562 | 1563 | 1551 1564 | 3535 1565 | 5559 1566 | 3981 1567 | 2449 1568 | 5891 1569 | 1862 1570 | 4689 1571 | 6438 1572 | 2998 1573 | 5800 1574 | 3080 1575 | 3931 1576 | 5084 1577 | 1578 | 2977 1579 | 4986 1580 | 1241 1581 | 2931 1582 | 5795 1583 | 2783 1584 | 2643 1585 | 1917 1586 | 1246 1587 | 3664 1588 | 1974 1589 | 1619 1590 | 5715 1591 | 5610 1592 | 3614 1593 | 1594 | 29617 1595 | 32230 1596 | 1597 | 6879 1598 | 11068 1599 | 6443 1600 | 7504 1601 | 8107 1602 | 13469 1603 | 1604 | 10186 1605 | 22380 1606 | 1607 | 4308 1608 | 5637 1609 | 4183 1610 | 5385 1611 | 4857 1612 | 2530 1613 | 5744 1614 | 5698 1615 | 5974 1616 | 1331 1617 | 1545 1618 | 1817 1619 | 4727 1620 | 1621 | 15946 1622 | 21142 1623 | 16286 1624 | 1625 | 1355 1626 | 4589 1627 | 2441 1628 | 4682 1629 | 4249 1630 | 7641 1631 | 6701 1632 | 7947 1633 | 6846 1634 | 3037 1635 | 3281 1636 | 1637 | 2827 1638 | 4389 1639 | 15815 1640 | 17784 1641 | 1642 | 5460 1643 | 5000 1644 | 18466 1645 | 1646 | 2896 1647 | 7920 1648 | 1294 1649 | 3749 1650 | 3284 1651 | 11674 1652 | 10546 1653 | 1654 | 9645 1655 | 3616 1656 | 5426 1657 | 5033 1658 | 6267 1659 | 5149 1660 | 2317 1661 | 7252 1662 | 1663 | 11261 1664 | 7599 1665 | 7070 1666 | 11079 1667 | 12583 1668 | 9632 1669 | 1670 | 5003 1671 | 3675 1672 | 2638 1673 | 4788 1674 | 6358 1675 | 5844 1676 | 3350 1677 | 5636 1678 | 1390 1679 | 2913 1680 | 2232 1681 | 5648 1682 | 5939 1683 | 4955 1684 | 1685 | 12306 1686 | 24639 1687 | 21554 1688 | 1689 | 4949 1690 | 7026 1691 | 4490 1692 | 2871 1693 | 5707 1694 | 1733 1695 | 6263 1696 | 3539 1697 | 1017 1698 | 3931 1699 | 6667 1700 | 7220 1701 | 1702 | 50107 1703 | 1704 | 1353 1705 | 18516 1706 | 16760 1707 | 17546 1708 | 1709 | 17547 1710 | 18508 1711 | 12691 1712 | 16655 1713 | 1714 | 10956 1715 | 2619 1716 | 3158 1717 | 5111 1718 | 4375 1719 | 6522 1720 | 8374 1721 | 1722 | 3719 1723 | 2133 1724 | 4951 1725 | 6984 1726 | 2470 1727 | 6827 1728 | 5425 1729 | 2317 1730 | 1196 1731 | 1167 1732 | 1082 1733 | 5110 1734 | 1735 | 1780 1736 | 4083 1737 | 2628 1738 | 1244 1739 | 2630 1740 | 1111 1741 | 1212 1742 | 4620 1743 | 1361 1744 | 4214 1745 | 5617 1746 | 1347 1747 | 2713 1748 | 5083 1749 | 2211 1750 | 1751 | 6596 1752 | 5657 1753 | 3296 1754 | 2932 1755 | 1807 1756 | 8779 1757 | 7052 1758 | 3786 1759 | 4635 1760 | 1777 1761 | 1762 | 1354 1763 | 5299 1764 | 6443 1765 | 5523 1766 | 4715 1767 | 5121 1768 | 7567 1769 | 6337 1770 | 5534 1771 | 1844 1772 | 4533 1773 | 1774 | 23322 1775 | 1210 1776 | 3150 1777 | 1778 | 2484 1779 | 1722 1780 | 8751 1781 | 3583 1782 | 3184 1783 | 5899 1784 | 1472 1785 | 2242 1786 | 2055 1787 | 8239 1788 | 1789 | 6447 1790 | 4108 1791 | 6164 1792 | 5512 1793 | 3711 1794 | 6093 1795 | 3813 1796 | 1251 1797 | 6188 1798 | 1785 1799 | 4931 1800 | 3077 1801 | 1802 | 9885 1803 | 9867 1804 | 5861 1805 | 2405 1806 | 6334 1807 | 10881 1808 | 3816 1809 | 1810 | 7650 1811 | 4178 1812 | 8336 1813 | 8110 1814 | 1777 1815 | 7897 1816 | 9552 1817 | 6168 1818 | 1819 | 3208 1820 | 5307 1821 | 4567 1822 | 1317 1823 | 4974 1824 | 5175 1825 | 3512 1826 | 3402 1827 | 4728 1828 | 5527 1829 | 5545 1830 | 3284 1831 | 5596 1832 | 4062 1833 | 1904 1834 | 1835 | 6032 1836 | 4154 1837 | 3490 1838 | 12546 1839 | 5649 1840 | 5270 1841 | 1842 | 6961 1843 | 4013 1844 | 4916 1845 | 4179 1846 | 1211 1847 | 7349 1848 | 4890 1849 | 1517 1850 | 4413 1851 | 1651 1852 | 2315 1853 | 5808 1854 | 1855 | 7126 1856 | 16312 1857 | 18704 1858 | 6831 1859 | 1860 | 2261 1861 | 18391 1862 | 6281 1863 | 8852 1864 | 1865 | 1946 1866 | 6964 1867 | 8157 1868 | 2974 1869 | 5601 1870 | 1525 1871 | 3589 1872 | 2946 1873 | 1874 | 5734 1875 | 4359 1876 | 5519 1877 | 1372 1878 | 4662 1879 | 3645 1880 | 5657 1881 | 5662 1882 | 2586 1883 | 3218 1884 | 1885 | 3863 1886 | 4000 1887 | 1419 1888 | 9581 1889 | 7539 1890 | 7915 1891 | 2498 1892 | 1755 1893 | 7816 1894 | 1895 | 4417 1896 | 8141 1897 | 2738 1898 | 2439 1899 | 6030 1900 | 8163 1901 | 7689 1902 | 2724 1903 | 1714 1904 | 4775 1905 | 1906 | 25107 1907 | 23575 1908 | 1909 | 2326 1910 | 4714 1911 | 3260 1912 | 2151 1913 | 2626 1914 | 3462 1915 | 3721 1916 | 2064 1917 | 4631 1918 | 5006 1919 | 4407 1920 | 3312 1921 | 6082 1922 | 5398 1923 | 2887 1924 | 1925 | 15426 1926 | 8430 1927 | 8716 1928 | 13178 1929 | 9542 1930 | 1931 | 14059 1932 | 12861 1933 | 2877 1934 | 1935 | 29214 1936 | 1937 | 3226 1938 | 2480 1939 | 4432 1940 | 4062 1941 | 6295 1942 | 6194 1943 | 6685 1944 | 6480 1945 | 5192 1946 | 4150 1947 | 1948 | 2195 1949 | 3530 1950 | 8899 1951 | 6012 1952 | 1369 1953 | 1331 1954 | 3203 1955 | 3697 1956 | 6926 1957 | 1958 | 10843 1959 | 8715 1960 | 8009 1961 | 6756 1962 | 4204 1963 | 12089 1964 | 1965 | 2746 1966 | 3205 1967 | 5651 1968 | 3786 1969 | 6044 1970 | 6925 1971 | 6238 1972 | 5885 1973 | 3987 1974 | 4287 1975 | 1110 1976 | 1508 1977 | 6693 1978 | 1979 | 20460 1980 | 11678 1981 | 1982 | 2887 1983 | 2535 1984 | 2228 1985 | 7308 1986 | 6658 1987 | 3702 1988 | 4383 1989 | 4508 1990 | 6215 1991 | 3048 1992 | 2140 1993 | 1994 | 25977 1995 | 1996 | 19958 1997 | 20751 1998 | 8435 1999 | 2000 | 8100 2001 | 2237 2002 | 2012 2003 | 5688 2004 | 6781 2005 | 6579 2006 | 7230 2007 | 2736 2008 | 8174 2009 | 3292 2010 | 2011 | 4153 2012 | 1026 2013 | 2393 2014 | 1798 2015 | 4098 2016 | 5538 2017 | 5024 2018 | 5596 2019 | 5731 2020 | 4619 2021 | 5547 2022 | 4523 2023 | 1765 2024 | 1443 2025 | 1659 2026 | 2027 | 28275 2028 | 14784 2029 | 2030 | 24558 2031 | 17590 2032 | 1011 2033 | 2034 | 1137 2035 | 1609 2036 | 3378 2037 | 8204 2038 | 1517 2039 | 5949 2040 | 1055 2041 | 6075 2042 | 1424 2043 | 2625 2044 | 2045 | 1374 2046 | 2356 2047 | 4734 2048 | 5102 2049 | 5200 2050 | 6172 2051 | 4473 2052 | 4267 2053 | 2878 2054 | 1711 2055 | 1228 2056 | 3968 2057 | 2210 2058 | 2059 | 1584 2060 | 7971 2061 | 7179 2062 | 4611 2063 | 1451 2064 | 1960 2065 | 5043 2066 | 5751 2067 | 3128 2068 | 6834 2069 | 2070 | 4158 2071 | 5288 2072 | 12009 2073 | 2525 2074 | 4308 2075 | 6756 2076 | 2077 | 15397 2078 | 14866 2079 | 14231 2080 | 2081 | 2921 2082 | 5355 2083 | 4326 2084 | 3965 2085 | 6581 2086 | 1724 2087 | 6805 2088 | 4925 2089 | 6913 2090 | 5527 2091 | 2092 | 6849 2093 | 3614 2094 | 6330 2095 | 3612 2096 | 5259 2097 | 6735 2098 | 1603 2099 | 3153 2100 | 5160 2101 | 5526 2102 | 5990 2103 | 2125 2104 | 2105 | 3994 2106 | 7956 2107 | 1295 2108 | 17255 2109 | 2110 | 48885 2111 | 2112 | 8156 2113 | 10864 2114 | 20472 2115 | 2116 | 12590 2117 | 12826 2118 | 3397 2119 | 6956 2120 | 10270 2121 | 11191 2122 | 2123 | 6437 2124 | 5402 2125 | 5892 2126 | 13043 2127 | 7154 2128 | 2129 | 3074 2130 | 5746 2131 | 6941 2132 | 4546 2133 | 6483 2134 | 6929 2135 | 7339 2136 | 3236 2137 | 2521 2138 | 1728 2139 | 5400 2140 | 2141 | 5981 2142 | 2368 2143 | 2910 2144 | 4789 2145 | 4622 2146 | 1146 2147 | 2793 2148 | 5396 2149 | 5501 2150 | 4040 2151 | 4427 2152 | 5061 2153 | 4944 2154 | 6396 2155 | 2156 | 3890 2157 | 8736 2158 | 7073 2159 | 2115 2160 | 2762 2161 | 7470 2162 | 9355 2163 | 1754 2164 | 2165 | 10134 2166 | 24611 2167 | 20758 2168 | 2169 | 3021 2170 | 4624 2171 | 12109 2172 | 10211 2173 | 2174 | 3813 2175 | 2422 2176 | 4148 2177 | 1626 2178 | 1124 2179 | 6512 2180 | 5130 2181 | 4874 2182 | 5287 2183 | 5100 2184 | 1147 2185 | 2186 | 6020 2187 | 1121 2188 | 6018 2189 | 9226 2190 | 2792 2191 | 3706 2192 | 2193 | 8027 2194 | 14155 2195 | 14228 2196 | 11648 2197 | 14866 2198 | 2199 | 8839 2200 | 15560 2201 | 10935 2202 | 2677 2203 | 2764 2204 | 2205 | 6261 2206 | 13041 2207 | 5795 2208 | 11615 2209 | 9834 2210 | 7578 2211 | 2212 | 5560 2213 | 1044 2214 | 5120 2215 | 4165 2216 | 4273 2217 | 2333 2218 | 2606 2219 | 4919 2220 | 2166 2221 | 2723 2222 | 2711 2223 | 4169 2224 | 1192 2225 | 3290 2226 | 3375 2227 | 2228 | 9912 2229 | 13241 2230 | 10389 2231 | 6685 2232 | 4808 2233 | 1306 2234 | 2235 | 53747 2236 | 2237 | 13478 2238 | 10567 2239 | 2240 | 14438 2241 | 13430 2242 | 18691 2243 | 9087 2244 | 2245 | 3117 2246 | 1338 2247 | 5317 2248 | 3267 2249 | 2837 2250 | 4002 2251 | 4449 2252 | 3199 2253 | 2409 2254 | 2922 2255 | 2136 2256 | 1663 2257 | 4246 2258 | 1331 2259 | 3420 -------------------------------------------------------------------------------- /Sources/Day00.swift: -------------------------------------------------------------------------------- 1 | import Algorithms 2 | 3 | struct Day00: AdventDay { 4 | // Save your data in a corresponding text file in the `Data` directory. 5 | var data: String 6 | 7 | // Splits input data into its component parts and convert from string. 8 | var entities: [[Int]] { 9 | data.split(separator: "\n\n").map { 10 | $0.split(separator: "\n").compactMap { Int($0) } 11 | } 12 | } 13 | 14 | // Replace this with your solution for the first part of the day's challenge. 15 | func part1() -> Any { 16 | // Calculate the sum of the first set of input data 17 | entities.first?.reduce(0, +) ?? 0 18 | } 19 | 20 | // Replace this with your solution for the second part of the day's challenge. 21 | func part2() -> Any { 22 | // Sum the maximum entries in each set of data 23 | entities.map { $0.max() ?? 0 }.reduce(0, +) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Tests/AdventDay.swift: -------------------------------------------------------------------------------- 1 | import Testing 2 | 3 | @testable import AdventOfCode 4 | 5 | // One off test to validate that basic data load testing works 6 | struct AdventDayTests { 7 | 8 | @Test func testInitData() async throws { 9 | let challenge = Day00() 10 | #expect(challenge.data.starts(with: "4514")) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Day00.swift: -------------------------------------------------------------------------------- 1 | import Testing 2 | 3 | @testable import AdventOfCode 4 | 5 | // Make a copy of this file for every day to ensure the provided smoke tests 6 | // pass. 7 | struct Day00Tests { 8 | // Smoke test data provided in the challenge question 9 | let testData = """ 10 | 1000 11 | 2000 12 | 3000 13 | 14 | 4000 15 | 16 | 5000 17 | 6000 18 | 19 | 7000 20 | 8000 21 | 9000 22 | 23 | 10000 24 | 25 | """ 26 | 27 | @Test func testPart1() async throws { 28 | let challenge = Day00(data: testData) 29 | #expect(String(describing: challenge.part1()) == "6000") 30 | } 31 | 32 | @Test func testPart2() async throws { 33 | let challenge = Day00(data: testData) 34 | #expect(String(describing: challenge.part2()) == "32000") 35 | } 36 | } 37 | --------------------------------------------------------------------------------