Python | sympy.antidivisor_count() method
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)) |
chevron_right
filter_none
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)) |
chevron_right
filter_none
Output:
The number of anti-divisors of 128 : 6
Recommended Posts:
- class method vs static method in Python
- Python | os.dup() method
- Python | set() method
- Python | next() method
- Python | os.waitid() method
- Python | shutil.which() method
- Python PIL | getpalette() Method
- Python PIL | getcolors() Method
- Python | os.WIFEXITED() method
- Python | Tensorflow cos() method
- Python | os.major() method
- Python | os.stat() method
- Python | os.minor() method
- Python | os.fstat() method
- Python | os.umask() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



