We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a39dedc commit 03aea65Copy full SHA for 03aea65
python/1523-count-odd-numbers-in-an-interval-range.py
@@ -0,0 +1,5 @@
1
+class Solution:
2
+ def countOdds(self, low: int, high: int) -> int:
3
+ if low%2!=0 or high%2!=0:
4
+ return (high-low)//2 +1
5
+ return (high-low)//2
0 commit comments