Addition of numbers
Description
For each line of input, given two integers in the range [0, 100) in decimal separated by a tab character, output their sum.
Judge
(async function*(context: Context): Challenge { yield* (context.runTestCases( [ ["3\t4", "7"], ["10\t8", "18"], ["1\t2", "3"], ...range(42).map( i => { const a = rand(100); const b = rand(100); return [`${a}\t${b}`,`${a+b}`] as [string, string]; } ) ] )); return context.noFailures(); })
Example Code
// This was supposed to be vyxal // but apparently for whatever reason // the example code _has_ to be js // and it has to pass as well. inp = (require('fs').readFileSync(0)+'').split('\n'); inp.map(a=>a.split('\t')).map(inp=>console.log(eval(inp[0]) + eval(inp[1])))
Suggestion to edit description