4

[Forenspiel] Member vs. Team
-
-
h0h0h0.
-
h1h1h1.
-
2
-
3
-
h0h0h0!
-
1
-
zwei
-
3
-
Code
Alles anzeigenimport cond.exc.IllegalValueException; import cond.util.Math; public class Main { private static long start, end, sumOf3, sumOf5, doubles; public static void main(String[] args) throws IllegalValueException { start = System.currentTimeMillis(); end = 0; sumOf3 = 0; sumOf5 = 0; doubles = 0; for (long x = 3; x < 1000; x += 3) { if (x % 3 == 0) sumOf3 += x; } for (long x = 5; x < 1000; x += 5) { if (x % 5 == 0) sumOf5 += x; } for (long x = 3; x < 1000; x++) { if (x % 3 == 0 && x % 5 == 0) doubles += x; } System.out.println(Math.subtract(Math.subtract(Math.add(sumOf3, sumOf5), doubles), 233168)); end = System.currentTimeMillis(); System.out.println("took " + (double) Math.divide(Math.subtract(end, start), 1000) + " seconds"); } }
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
Hey, st0p
-
1
-
2
-
3