Compare commits
2 Commits
b12bf04f91
...
2c03c77ff6
Author | SHA1 | Date | |
---|---|---|---|
2c03c77ff6 | |||
7ea4390d3d |
@@ -8,7 +8,7 @@ func readInput(_ filePath: String) throws -> [Int] {
|
||||
func haggle(_ seeds: [Int]) -> [[Int]: [Int: Int]] {
|
||||
var bananas: [[Int]: [Int: Int]] = [:]
|
||||
for (monkey, seed) in seeds.enumerated() {
|
||||
var prevs = [Int.min, Int.min, Int.min, Int.min]
|
||||
var prevs = [monkey, seed, Int.min, Int.min]
|
||||
var lastPrice = seed
|
||||
for _ in 0..<2000 {
|
||||
var price = ((lastPrice << 6) ^ lastPrice) & 16777215
|
||||
|
Reference in New Issue
Block a user