Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static long Ylee(long N)
- {
- long count = 0; // verifiy valid (n,k) as sigma(n+k) - sigma(n) = sigma(k) + n*k
- for (Int64 i = Convert.ToInt64(Math.Sqrt(2 * N)); i > 1; i--)
- if ((N - ((i * (i + 1)) / 2)) % i == 0) count++;
- return count;
- }
Add Comment
Please, Sign In to add comment