Submission #1160768
Source Code Expand
extension String: CollectionType{} let a : Int = Int(readLine()!)! let b: [Int] = readLine()!.split(separator: " ").map { Int($0)! } for i in 0... a-2 { }
Submission Info
Submission Time | |
---|---|
Task | A - ニコニコ数 |
User | RHD_CW_0034 |
Language | Swift (swift-2.2-RELEASE) |
Score | 0 |
Code Size | 160 Byte |
Status | CE |
Compile Error
./Main.swift:3:33: error: extraneous argument label 'separator:' in call let b: [Int] = readLine()!.split(separator: " ").map { Int($0)! } ^~~~~~~~~~~~ ./Main.swift:4:15: error: expected '{' to start the body of for-each loop for i in 0... a-2 { ^ ./Main.swift:4:19: error: statement cannot begin with a closure expression for i in 0... a-2 { ^ ./Main.swift:4:19: note: explicitly discard the result of the closure by assigning to '_' for i in 0... a-2 { ^ _ = ./Main.swift:4:19: error: braced block of statements is an unused closure for i in 0... a-2 { ^ ./Main.swift:4:11: error: '...' is not a postfix unary operator for i in 0... a-2 { ^ ./Main.swift:4:19: error: expression resolves to an unused function for i in 0... a-2 { ^