add challenge scripts
This commit is contained in:
21
js/02_these_numbers_are_big.js
Normal file
21
js/02_these_numbers_are_big.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const m = 14004392365098131090160062970945115111185775413941111064876648140973294115502980816410773368597517292734034227298996122159833675150497554142801209096513652073059992938078366061434391648276904643753267405058183481162693381822800709938988762923n;
|
||||
let h;
|
||||
|
||||
async function prepare() {
|
||||
if(n == 10000n) {
|
||||
h = await sha256(name);
|
||||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
if(n >= 20000n) {
|
||||
return;
|
||||
}
|
||||
if(n == 10000n) {
|
||||
x += h;
|
||||
}
|
||||
n++;
|
||||
for(let i = 0; i < 100; i++) {
|
||||
x = pow(x, 65537n, m);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user