fixed bug with day 15
This commit is contained in:
parent
47510ec0ff
commit
56a0f22357
@ -4,7 +4,8 @@ var total = 0;
|
||||
for(var i = 0; i <= 40000000; i++){
|
||||
a = (a*16807)%2147483647;
|
||||
b = (b*48271)%2147483647;
|
||||
if(a.toString(2).slice(-16) == b.toString(2).slice(-16)){
|
||||
padding = "0000000000000000";
|
||||
if((padding+a.toString(2)).slice(-16) == (padding+ b.toString(2)).slice(-16)){
|
||||
total++;
|
||||
console.log(i);
|
||||
console.log(a, b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user