#K74747. Counting Divisors

    ID: 34266 Type: Default 1000ms 256MiB

Counting Divisors

Counting Divisors

Given an integer ( N ) (with ( 1 \leq N \leq 10^6 )), your task is to compute the number of positive divisors of ( N ). A divisor ( d ) of ( N ) is defined by the condition $$ N \bmod d = 0 $$ and ( 1 \leq d \leq N ). Note that ( N ) is always a divisor of itself. This problem tests your understanding of number theory fundamentals and efficient iteration up to ( \sqrt{N} ) for divisor counting.

inputFormat

The input consists of a single integer ( N ) provided via stdin.\n\nConstraints: ( 1 \leq N \leq 10^6 ).

outputFormat

Output a single integer to stdout, representing the number of divisors of ( N ).## sample

6
4