[백준11022_자바스크립트(javascript)] - A+B - 8

경이·2024년 8월 27일

𝑩𝑶𝑱 (𝒋𝒔)

목록 보기
156/325

🔴 문제

A+B - 8


🟡 Sol

const fs = require('fs');
const path = process.platform === 'linux' ? '/dev/stdin' : 'Wiki\\input.txt';
const inputs = fs.readFileSync(path).toString().trim().split('\n');

for (let i = 1; i < inputs.length; i++) {
  const [a, b] = inputs[i].split(' ').map(Number);

  console.log(`Case #${i}: ${a} + ${b} = ${a + b}`);
}

🟢 풀이

⏰ 소요한 시간 : -

A+B - 7과 동일한 문제 출력할 때 ab를 추가하여 출력해주면 된다.


🔵 Ref

A+B - 7

profile
록타르오가르

0개의 댓글