Perform ceiling division of two integers. Args: x: the dividend. y: the divisor. Returns: The result of the ceiling division.
(x: int, y: int)
| 732 | |
| 733 | |
| 734 | def ceil_div(x: int, y: int) -> int: |
| 735 | """ |
| 736 | Perform ceiling division of two integers. |
| 737 | |
| 738 | Args: |
| 739 | x: the dividend. |
| 740 | y: the divisor. |
| 741 | |
| 742 | Returns: |
| 743 | The result of the ceiling division. |
| 744 | """ |
| 745 | return (x + y - 1) // y |
| 746 | |
| 747 | |
| 748 | def none_or_str(value): |