Related Articles
Python | sympy.antidivisor_count() method
• Last Updated : 17 Sep, 2019

With the help of sympy.antidivisor_count() method, we can find the count of anti-divisors of a given integer.

Syntax: antidivisor_count(n)

Parameter:
n – It denotes an integer.

Returns: Returns the count of anti-divisors of the given integer.

Example #1:

 `# import antidivisor_count() method from sympy ` `from` `sympy.ntheory.factor_ ``import` `antidivisor_count ` ` `  `n ``=` `24` ` `  `# Use antidivisor_count() method  ` `antidivisor_count_n ``=` `antidivisor_count(n)  ` `     `  `print``(``"The number of anti-divisors of {} : {}"``.``format``(n, antidivisor_count_n)) `

Output:

```The number of anti-divisors of 24 : 2
```

Example #2:

 `# import antidivisor_count() method from sympy ` `from` `sympy.ntheory.factor_ ``import` `antidivisor_count ` ` `  `n ``=` `128` ` `  `# Use antidivisor_count() method  ` `antidivisor_count_n ``=` `antidivisor_count(n)  ` `     `  `print``(``"The number of anti-divisors of {} : {}"``.``format``(n, antidivisor_count_n)) `

Output:

```The number of anti-divisors of 128 : 6
```

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :