package leetcode;

/**
 * https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/
 */
public class Problem1523 {
    public int countOdds(int low, int high) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1523 prob = new Problem1523();
        System.out.println(prob.countOdds(3, 7)); // 3
        System.out.println(prob.countOdds(8, 10)); // 1
    }
}

@@ -178,242 +178,172 @@
     
-// TODO%0A        return 
+double n = (high - low + 1) / 2.
 0;%0A    
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1523 prob = new Problem1523();%0A        System.out.println(prob.countOdds(3, 7)); // 3%0A        System.out.println(prob.countOdds(8, 10)); // 1
+if (low %25 2 != 0 %7C%7C high %25 2 != 0) %7B%0A            return (int) Math.ceil(n);%0A        %7D%0A        return (int) Math.floor(n);
 %0A   

Solve problem 1523