Factor Count - Integer

Factor Count - Integer  

A number N is passed as input. The program should print the count of factors for the number N. 

Input Format: 

The first line will contain the number N. 

Output Format: 

The first line will contain the count of factors for the number N. 

Boundary Condition(s): 

1 <= N < 10^7 

Example Input/Output 1: 

Input: 

100 

Output: 

Example Input/Output 2: 

Input: 

Output: 

4

Program:

n = int(input())

f = 0

for i in range(1,n+1):

    if n%i == 0:

        f += 1 

print(f)        

Comments

Popular posts from this blog

Pronic Integers in N - InfyTQ question

Count Strong Points - Accenture

Letters at position of multiples of a number