[Node.js/JAVASCRIPT] ๋ฐฑ์ค€ 2577๋ฒˆ ์ˆซ์ž์˜ ๊ฐœ์ˆ˜
ยท
์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ
๋ฌธ์ œ ์„ธ ๊ฐœ์˜ ์ž์—ฐ์ˆ˜ A, B, C๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ A × B × C๋ฅผ ๊ณ„์‚ฐํ•œ ๊ฒฐ๊ณผ์— 0๋ถ€ํ„ฐ 9๊นŒ์ง€ ๊ฐ๊ฐ์˜ ์ˆซ์ž๊ฐ€ ๋ช‡ ๋ฒˆ์”ฉ ์“ฐ์˜€๋Š”์ง€๋ฅผ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค. ์˜ˆ๋ฅผ ๋“ค์–ด A = 150, B = 266, C = 427 ์ด๋ผ๋ฉด A × B × C = 150 × 266 × 427 = 17037300 ์ด ๋˜๊ณ , ๊ณ„์‚ฐํ•œ ๊ฒฐ๊ณผ 17037300 ์—๋Š” 0์ด 3๋ฒˆ, 1์ด 1๋ฒˆ, 3์ด 2๋ฒˆ, 7์ด 2๋ฒˆ ์“ฐ์˜€๋‹ค. ํ’€์ด const input = require('fs').readFileSync('/dev/stdin').toString().trim().split('\n') .map((x) => Number(x)); const multiplyNum = (input[0] * input[1] * input[2]).toString()...
_์„ฑํ˜ธ_
'filter() ๋ฉ”์„œ๋“œ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก