

public class Problem001 {

	public static void main (String[] args){
				
		int result = 0;
		
		final int TARGET = 1000;
		
		for (int i = 3; i < TARGET; i += 3){
			if (i %  5 != 0) {
				result += i;
			}
		}
		
		for (int i = 5; i < TARGET; i += 5){
			result += i;
		}
		
		System.out.println(result);
		
	}
	
}

@@ -66,19 +66,17 @@
 rgs)%7B%0A%09%09
-%09%09
 %0A
+
 %09%09int re
@@ -124,136 +124,304 @@
 %09%0A%09%09
-for (int i = 3; i %3C TARGET; i += 3)%7B%0A%09%09%09if (i %25  5 != 0) %7B%0A%09%09%09%09result += i;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09for (int i = 5; i %3C TARGET; i += 5)%7B%0A%09
+// arithmetic series for 3, 5, 15.%0A%09%09int multiplesOfThree = (TARGET - 1) / 3;%0A%09%09result += 3 * multiplesOfThree * (1 + multiplesOfThree) * 0.5;%0A%0A%09%09int multiplesOfFive = (TARGET - 1) / 5;%0A%09%09result += 5 * multiplesOfFive * (1 + multiplesOfFive) * 0.5;%0A%0A%09%09int multiplesOfFifteen = (TARGET - 1) / 15;%0A
 %09%09re
@@ -429,20 +429,69 @@
 ult 
-+= i;%0A%09%09%7D%0A%09%09
+-= 15 * multiplesOfFifteen * (1 + multiplesOfFifteen) * 0.5;%0A
 %0A%09%09S
@@ -508,16 +508,29 @@
 println(
+%22Result: %22 + 
 result);

make this thing go much, much faster by not being stupid.