문제
https://www.acmicpc.net/problem/2839
풀이
let input = require('fs').readFileSync('/dev/stdin');
let count = 0;
while (input > 0) {
if (input % 5 === 0) {
input -= 5;
} else {
input -= 3;
}
count += 1;
}
input === 0 ? console.log(count) : console.log(-1);
while문을 많이 안써봐서 할때마다 새로운데 활용을 자주하면서 익숙해져야겠다.