import Foundation
let input = readLine()!.components(separatedBy: " ").map { Int($0)! }
let x = input[0]
let y = input[1]
let w = input[2]
let h = input[3]
print(min(w - x, x, h - y, y))
๋จธ๋ฆฟ์์ผ๋ก ์ขํ๊ณ ์์ํ๋ฉด์ ๊ฐ๋จํ๊ฒ ํ์๋ค.
๋ฐ์ํ
'๐ ์ฝํ > BOJ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Swift] ๋ฐฑ์ค1436 (0) | 2023.03.23 |
---|---|
[Swift] ๋ฐฑ์ค1181 (0) | 2023.03.23 |
[Swift] ๋ฐฑ์ค1259 (0) | 2023.03.23 |
[Swift] ๋ฐฑ์ค1018 (0) | 2023.03.22 |
[Swift] ๋ฐฑ์ค 2475 (0) | 2023.03.22 |