1 /// <summary> 2 /// Solution 3 /// 100/100 4 /// </summary> 5 /// <param name="N"></param> 6 /// <returns></returns> 7 public int solution(int N) 8 { 9 int result = 0; 10 int sqrtN = Convert.ToInt32(Math.Sqrt(N)); 11 12 for (int i = 1; i <= sqrtN; i++) 13 { 14 if (N % i == 0) 15 result++; 16 } 17 18 if (sqrtN * sqrtN == N) 19 result = result * 2 - 1; 20 else 21 result = result * 2; 22 return result; 23 }