• + 3 comments

    @pankaj113, You can simplify/reduce your code by moving this line

    int ex_chocs = wrapper / m; 
    

    inside while loop, like so:

    while(wrapper >= m) {
        int ex_chocs = wrapper / m;
        wrapper = ex_chocs + wrapper % m;
        chocs += ex_chocs;
    }
    System.out.println(chocs);