add challenge scripts
This commit is contained in:
15
js/07_weird_assembly_machine.js
Normal file
15
js/07_weird_assembly_machine.js
Normal file
@@ -0,0 +1,15 @@
|
||||
let f;
|
||||
|
||||
async function prepare() {
|
||||
const get = fetch('07_weird_assembly_machine.wasm');
|
||||
const obj = await WebAssembly.instantiateStreaming(get);
|
||||
f = obj.instance.exports.f;
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
if(n >= 10n**18n) {
|
||||
return;
|
||||
}
|
||||
n++;
|
||||
x = BigInt.asUintN(64, f(x, n));
|
||||
}
|
Reference in New Issue
Block a user