Run Bun 1 online — the all-in-one JavaScript/TypeScript runtime, bundler, and test runner.
Bun is a from-scratch JavaScript runtime built in Zig on top of JavaScriptCore. Startup is fast, `bun test` and `bun install` are dramatically faster than Node equivalents.
ls-judge runs Bun 1 inside a Firecracker microVM. Great for benchmarking JS hot paths without paying Node startup cost.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
const lines=[];
process.stdin.on('data',d=>lines.push(d));
process.stdin.on('end',()=>{
const n=parseInt(lines.join('').trim());
process.stdout.write((n*2)+'\n');
});
21
42