Return non-optional array up to the last int from integers()
This commit is contained in:
parent
00d14b6e19
commit
81198be13a
4 changed files with 5 additions and 6 deletions
|
@ -3,7 +3,7 @@ import Foundation
|
|||
let input = loadData(day: 9)
|
||||
let scanner = Scanner(string: input)
|
||||
|
||||
let numbers = scanner.integers()!
|
||||
let numbers = scanner.integers()
|
||||
|
||||
var weakness: Int? = nil
|
||||
outer: for i in 25..<numbers.count {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue