Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b5ab1c7

Browse files
add solution in Python for 1523_count_odd_numbers_in_an_interval_range.py
1 parent 99708a9 commit b5ab1c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def countOdds(self, low: int, high: int) -> int:
2+
return (high + 1) // 2 - low // 2

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /