
const fs = require('fs');
const path = process.platform === 'linux' ? '/dev/stdin' : 'Wiki\\input.txt';
const [a, b] = fs
.readFileSync(path, 'utf-8')
.trim()
.split('\n')
.map(BigInt);
console.log((a+b).toString());
console.log((a-b).toString());
console.log((a*b).toString());
⏰ 소요한 시간 : -
자바스크릡트에서 16자리 이상의 큰 수를 다룰때는 number 타입이 아닌 BigInt 타입으로 다룬다.