[자바스크립트로 구현한 알고리즘] Fizz / Buzz

남양주개발자

·

2016. 10. 16. 01:04

728x90
반응형


Description: 


Write a function that takes an integer and returns an Array [A, B, C] where A is the number of multiples of 3 (but not 5) less than the given integer, B is the number of multiples of 5 (but not 3) less than the given integer and C is the number of multiples of 3 and 5 less than the given integer. 


For example, solution(20) should return [5, 2, 1]



3의 배수와 5의 배수 그리고 3과 5의 배수가 동시에 충족시키는 조건을 구현하는 코드입니다.

728x90
반응형
그리드형

💖 저자에게 암호화폐로 후원하기 💖

아이콘을 클릭하면 지갑 주소가자동으로 복사됩니다