func solution(_ a:Int, _ b:Int) -> Int64 {
let a = Int64(a), b = Int64(b)
var result: Int64 = 0
if a == b {
return a
} else {
let large:Int64 = a > b ? a : b
let small:Int64 = a < b ? a : b
//print("\(large), \(small)")
for i in small...large {
result += i
}
}
return result
}
func solution(_ a:Int, _ b:Int) -> Int64 {
var result = 0
if a < b {
for i in a...b {
result += i
}
} else {
for i in b...a {
result += i
}
}
return Int64(result)
}