Pythagorean triples/Java/Brute force primitives: Difference between revisions

m
Moved the LIMIT declaration but forgot to take the comment with it
(Fursther optimization by skipping more a,b pair candidates (noted in the comments), rm runtime calculations)
m (Moved the LIMIT declaration but forgot to take the comment with it)
Line 17:
B127 = BigInteger.valueOf(127),
B191 = BigInteger.valueOf(191);
//change this to whatever perimeter limit you want;the RAM's the limit
private static BigInteger LIMIT = BigInteger.valueOf(100);
Line 70 ⟶ 71:
long primCount = 0;
 
//change this to whatever perimeter limit you want;the RAM's the limit
BigInteger peri2 = LIMIT.divide(BigInteger.valueOf(2)),
peri3 = LIMIT.divide(BigInteger.valueOf(3));
Anonymous user