@@ -0,0 +1,756 @@
+package fillingjars;%0D%0A%0D%0Aimport java.io.*;%0D%0Aimport java.util.*;%0D%0Aimport java.text.*;%0D%0Aimport java.math.*;%0D%0Aimport java.util.regex.*;%0D%0A%0D%0Apublic class Solution %7B%0D%0A    private static Scanner stdin = new Scanner(System.in);%0D%0A    %0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        long numJars = stdin.nextLong();%0D%0A        long numOperations = stdin.nextLong();%0D%0A        long sum = 0;%0D%0A        for(int i = 0; i %3C numOperations; i++)%7B%0D%0A        %09long firstJarIndex = stdin.nextLong();%0D%0A        %09long lastJarIndex = stdin.nextLong();%0D%0A        %09long numCandies = stdin.nextLong();%0D%0A            sum += (lastJarIndex-firstJarIndex+1) * numCandies;%0D%0A        %7D%0D%0A        long average = (long)Math.floor(sum / numJars);%0D%0A        System.out.println(average);%0D%0A    %7D%0D%0A%7D

Add solution to "Filling Jars" problem