baekjoon 20260304
This commit is contained in:
parent
8ecf0fdce4
commit
7d3a8a3ec9
14
code_study/Baekjoon/swift/2460.swift
Normal file
14
code_study/Baekjoon/swift/2460.swift
Normal 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)
|
||||||
Loading…
x
Reference in New Issue
Block a user