728x90 약수의갯수1 [Codility] Lesson10 - Prime and Composite numbers : CountFactors (c++) Problem A positive integer D is a factor of a positive integer N if there exists an integer M such that N = D * M. For example, 6 is a factor of 24, because M = 4 satisfies the above condition (24 = 6 * 4). Write a function: int solution(int N); that, given a positive integer N, returns the number of its factors. For example, given N = 24, the function should return 8, because 24 has 8 factors, .. 2021. 1. 12. 이전 1 다음 728x90