268. 약수의 합

김해준's avatar
Jan 14, 2026
268. 약수의 합

사용언어 : C#

문제
notion image
풀이
public class Solution { public int solution(int n) { int answer = 0; for(int i = 1 ; i <= n; i++) { if(n % i == 0) answer+= i; } return answer; } }
notion image
Share article