Hardcore Optimization
~ 1000% faster
This commit is contained in:
parent
07f3f6be4b
commit
9f957cab74
@ -9,7 +9,7 @@ public class aufg3 {
|
||||
// =====================
|
||||
|
||||
public static void main(String[] args){
|
||||
int MAXIMUM = 100_000;
|
||||
int MAXIMUM = 100_000_000;
|
||||
int MAX_PER_ROW = 20;
|
||||
|
||||
boolean[] primes = new boolean[MAXIMUM];
|
||||
@ -17,7 +17,7 @@ public class aufg3 {
|
||||
Arrays.fill(primes, true);
|
||||
|
||||
for(int i=2; i < MAXIMUM * 0.5; i++){
|
||||
for(int j=2; j < MAXIMUM; j++){
|
||||
for(int j=2; j < ((MAXIMUM*1.0)/i); j++){
|
||||
|
||||
int index = i * j;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user