https://www.acmicpc.net/problem/2577
filter를 이용해서 string안의 element값이 0,1,2,3,4,5,6,7,8,9만 가진 String으로 만들어준 후 그것의 개수를 세줬습니다.
import Foundation
if let a = readLine(), let b = readLine(), let c = readLine() {
let result = String(Int(a)! * Int(b)! * Int(c)!)
for i in 0...9 {
print(result.filter{ String($0) == "\(i)"}.count)
}
}