알고리즘

[백준 10953][Swift] 두 정수 A와 B를 입력받은 다음, A+B를 출력 -6

moving 2022. 3. 31. 16:48
728x90

 

 

코드

let inputT = Int(readLine()!)!

for _ in 1...inputT {
    let inputNum = (readLine()?.split(separator: ",").map { Int($0)! })!
    print(inputNum[0] + inputNum[1])
}

 

 

https://www.acmicpc.net/problem/10953

 

10953번: A+B - 6

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net