Back
Close
  • 1

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

Given an integer N, find the number of pairs of integers (A, B) that satisfies (A*B)/(A+B)=N.

Example:
If N=2, the integer solutions (A, B) to the equation (A*B)/(A+B)=N are (-2, 1), (1, -2), (3, 6), (4, 4) and (6, 3). Thus, the output is 5.
Input
An integer N.
Output
An integer for the number of pairs of integers.
Constraints
1 ≤ N ≤ 10^14
Example
Input
2
Output
5

A higher resolution is required to access the IDE