본문으로 바로가기

[Swift] 백준 2908 - 상수

category 코딩테스트/Swift 2021. 8. 21. 20:49
// https://www.acmicpc.net/problem/2908

import Foundation

let input = readLine()!.split(separator: " ").map { Int(String($0.reversed()))! }

print(max(input[0], input[1]))

/*

 max(_ x:_ y:)
 
 x: A value to compare
 y: Another value to compare
 
 The greather of x and y. If x is equal to y, return y
 
*/