baekjoon 20260304

This commit is contained in:
songyc macbook 2026-03-04 18:39:42 +09:00
parent 8ecf0fdce4
commit 7d3a8a3ec9

View File

@ -0,0 +1,14 @@
var ans: Int = 0
var cur: Int = 0
for _ in 0...9 {
guard let info = readLine() else { break }
let io = info.split(separator : " ").compactMap{Int($0)}
guard io.count == 2 else { break }
cur += io[1] - io[0]
ans = max(ans, cur)
}
print(ans)