#Integer 하나 받아오기
let numberOfCases = Int(readLine()!)!
#공백이 있는 숫자 나누기
for i in 1...numberOfCases{
let nums = readLine()!.split(separator:" ").map {Int($0)!}
let result = nums[0]+nums[1]
print("Case #\(i): \(result)")
}
반응형
'코딩테스트 > 백준' 카테고리의 다른 글
| [백준] 4673셀프넘버-Java (2) | 2022.05.11 |
|---|---|
| [Swift] 1712 손익분기점 (0) | 2022.02.09 |
| 2438-별 찍기 - 1 (0) | 2022.01.26 |
| 2739-구구단 (0) | 2022.01.26 |