LeetCode 1523. Count Odd Numbers in an Interval Range in F#

URL

https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/description/

Code

https://github.com/syohex/dotnet-study/blob/master/fsharp/leetcode/problems/1523/main.fsx

let countOdds (low: int) (high: int) : int =
    match low % 2 = 1, high % 2 = 1 with
    | true, true -> (high - low + 1) / 2 + 1
    | _ -> (high - low + 1) / 2