Write a function `sum_1_to_n(n: int) -> int` that returns the sum of all integers from 1 up to and including `n`. For example, `sum_1_to_n(4)` should return `10` because 1 + 2 + 3 + 4 = 10.
- The input `n` will be a non-negative integer (`0 <= n <= 10^9`).
- For `n = 0`, the sum is `0` (since there are no integers from 1 to 0).
- Your solution should handle large values of `n` efficiently. You must not use a loop that iterates from 1 to `n` because that will be too slow for large `n`.
- You may use the closed-form formula or any equivalent mathematical approach.
Constraints
0 <= n <= 10^9. The function should run in O(1) time and O(1) space.