Development/코딩테스트

[백준] 14623 Node

Yeony99 2022. 9. 20. 23:10
728x90

문제를 유심히 보자.. BigInt를 사용해야 한다. 길이가 30 이하의 자연수이므로 BigInt로 처리해야한다.

 

const fs = require('fs');

const [B1, B2] = fs.readFileSync("/dev/stdin").toString().trim().split("\n").map(BigInt);

let result = (BigInt("0b" + B1)*BigInt("0b" + B2)).toString(2)
console.log(result)
728x90