We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4230d2e + 7eb69dd commit 5275f57Copy full SHA for 5275f57
1523. Count Odd Numbers in an Interval Range
@@ -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