
🔴 문제
수학은 체육과목 입니다
🟡 Sol
const fs = require('fs');
const path = process.platform === 'linux' ? '/dev/stdin' : 'input.txt';
const n = Number(fs.readFileSync(path));
console.log(n * 4);
🟢 풀이
⏰ 소요한 시간 : -

이 규칙이 그림으로 보면 난잡할 수 있겠지만
둘레를 확인해보면 4씩 증가한다는 것을 알 수 있다.
따라서 n번째 둘레는 n*4를 출력하면 된다.
🔵 Ref