Ordered Pairs
InterviewTime limit0.5sMemory limit512 MB
Count the ordered pairs of natural numbers whose product equals a given N.
- Level
Easy3 of 10
- Topics
- Math, Number theory, Brute force, Implementation
- Solved
- No attempts yet
Problem
An ordered pair is written as . Two ordered pairs and are equal when and .
Given a natural number , write a program that counts the distinct ordered pairs whose product equals . Both and must be natural numbers.
Input
The first line contains a natural number ().
Output
Print the number of distinct ordered pairs whose product equals on the first line.