Submission #1697102


Source Code Expand

import Foundation

_ = readLine()
let c = readLine()!.characters.map({ Int(String($0))! })

let a = (1...4).map({ correct in
    c.filter({ guess in guess == correct }).count
})

print("\(a.maxElement()!) \(a.minElement()!)")

Submission Info

Submission Time
Task A - センター採点
User yamoridon
Language C++14 (GCC 5.4.1)
Score 0
Code Size 234 Byte
Status CE

Compile Error

./Main.cpp:6:10: error: too many decimal points in number
 let a = (1...4).map({ correct in
          ^
./Main.cpp:1:1: error: ‘import’ does not name a type
 import Foundation
 ^
./Main.cpp:4:56: error: expected unqualified-id before ‘)’ token
 let c = readLine()!.characters.map({ Int(String($0))! })
                                                        ^