[JS] 백준 1712번 손익분기점

jsg_ko·2021년 11월 28일
0

코테연습

목록 보기
18/21
let input = require('fs').readFileSync('/dev/stdin').toString().split(' ');

const A = input[0] * 1;
const B = input[1] * 1;
const C = input[2] * 1;

const margin = C - B;
const count = Math.floor(A / margin) + 1

console.log(margin <= 0 ? -1 : count);
profile
디버깅에서 재미를 추구하면 안되는 걸까

0개의 댓글