Result

WA

Duration

598ms

Code [DL]

(module(import"env""memory"(memory 8192))
(func(export"main")(result i32)
    (local $a i32)
    (local $d i32)(local $e i32)(local $f i32)
    (local $g i32)(local $h i32)(local $i i32)
    (local $j i32)(local $k i32)(local $l i32)
    (i32.const 4096)
    (set_local $a(call $m))
    (i32.const 4105)
    (set_local $d(i32.sub(call $m)(get_local $a)))
    (i32.const 4114)
    (set_local $g(i32.sub(call $m)(get_local $a)))
    (i32.const 4123)
    (set_local $j(i32.sub(call $m)(get_local $a)))
    (i32.const 4099)
    (set_local $a(call $m))
    (i32.const 4108)
    (set_local $e(i32.sub(call $m)(get_local $a)))
    (i32.const 4117)
    (set_local $h(i32.sub(call $m)(get_local $a)))
    (i32.const 4126)
    (set_local $k(i32.sub(call $m)(get_local $a)))
    (i32.const 4102)
    (set_local $a(call $m))
    (i32.const 4111)
    (set_local $f(i32.sub(call $m)(get_local $a)))
    (i32.const 4120)
    (set_local $i(i32.sub(call $m)(get_local $a)))
    (i32.const 4129)
    (set_local $l(i32.sub(call $m)(get_local $a)))
    (set_local $b(i32.div_u
        (i32.sub
            (i32.sub
                (i32.sub
                    (i32.add 
                        (i32.add 
                            (i32.mul(i32.mul(get_local $d)(get_local $h))(get_local $l))
                            (i32.mul(i32.mul(get_local $e)(get_local $i))(get_local $j)))
                        (i32.mul(i32.mul(get_local $f)(get_local $g))(get_local $k)))
                    (i32.mul(i32.mul (get_local $d)(get_local $k))(get_local $i)))
                (i32.mul(i32.mul (get_local $e)(get_local $l))(get_local $g)))
               (i32.mul(i32.mul(get_local $f)(get_local $j))(get_local $h)))
    (i32.const 6)))

    (set_local $i(i32.const 7))
    (block $r(loop $s
        (i32.store8(get_local $i)
            (i32.add
                (i32.sub(get_local $b)(i32.mul(i32.div_s(get_local $b)(i32.const 10))(i32.const 10)))
                (i32.const 48)
            )
        )
        (set_local $b(i32.div_u(get_local $b)(i32.const 10)))
        (br_if $r(i32.eq(get_local $i)(i32.const 0)))
        (set_local $i(i32.sub(get_local $i)(i32.const 1)))
    (br $s)))

    (i32.const 0)
    return
)

(func $m(param $i i32)(result i32)
    (i32.add
        (i32.mul
            (i32.const 10)
            (i32.sub
                (i32.load8_s(get_local $i))
                (i32.const 48)
            )
            )
        (i32.sub 
            (i32.load8_s(i32.add(get_local $i)(i32.const 1)))
            (i32.const 48)
        )
    )
)
)

stdin

78 77 74
36 09 38
96 31 53
26 39 78

stdout

stderr

/tmp/code.wat:31:16: error: undefined local variable "$b"
    (set_local $b(i32.div_u
               ^^
/tmp/code.wat:49:36: error: undefined local variable "$b"
                (i32.sub(get_local $b)(i32.mul(i32.div_s(get_local $b)(i32.co...
                                   ^^
/tmp/code.wat:49:68: error: undefined local variable "$b"
...(get_local $b)(i32.mul(i32.div_s(get_local $b)(i32.const 10))(i32.const 10)))
                                              ^^
/tmp/code.wat:53:43: error: undefined local variable "$b"
        (set_local $b(i32.div_u(get_local $b)(i32.const 10)))
                                          ^^
/tmp/code.wat:53:20: error: undefined local variable "$b"
        (set_local $b(i32.div_u(get_local $b)(i32.const 10)))
                   ^^
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/tmp/code.wasm'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (/root/wasm-cli.js:8:17)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
rm: can't remove '/tmp/code.wasm': No such file or directory

strace