[프로그래머스 자바] 17. N의 배수

김건우's avatar
Apr 06, 2025
[프로그래머스 자바] 17. N의 배수

문제

notion image

내가 푼 코드

notion image
class Solution { public int solution(int num, int n) { if (num % n == 0) { return 1; // num이 n의 배수일 때 } else { return 0; // num이 n의 배수가 아닐 때 } } }
 
Share article

gunwoo