Skip to content

Instantly share code, notes, and snippets.

@yukin01
Created April 27, 2019 09:50
Show Gist options
  • Save yukin01/b652b0ada2ef5bfad55b87eb028ad424 to your computer and use it in GitHub Desktop.
Save yukin01/b652b0ada2ef5bfad55b87eb028ad424 to your computer and use it in GitHub Desktop.
var inputLines = [String]()
while let line = readLine() {
inputLines.append(line)
}
let rows = inputLines.dropFirst()
rows.forEach { print($0) }
let input = """
1
2
3
4
5
"""
let inputLines = input.split(separator: "\n").map { $0.description }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment