87. 아이스 아메리카노

 


import Foundation

func solution(_ money:Int) -> [Int] {

    var answer : [Int] = []

    answer.append(money/5500)
    answer.append(money%5500)


    return answer
}

append를 이용하여 해결하였다.

다른 코드를 보니 그냥 배열안에 다이렉트로 해도 되었다.

[money/5500, money%5500] 이런식이었다.