Skip to content

Commit 5275f57

Browse files
authored
Create 1523. Count Odd Numbers in an Interval Range (#91)
1523. Count Odd Numbers in an Interval Range
2 parents 4230d2e + 7eb69dd commit 5275f57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution {
2+
public:
3+
int countOdds(int l, int h) {
4+
return ((h + 1) / 2) - (l / 2);
5+
}
6+
};

0 commit comments

Comments
 (0)