借助sympy.combinatorics.partitions.RGS_enum()方法,我们可以通过使用来获得总数为m的无限制增长字符串总数sympy.combinatorics.partitions.RGS_enum()方法。
用法:sympy.combinatorics.partitions.RGS_enum(m)
返回:Return a total number of unrestricted growth string.
范例1:
在这个例子中,我们可以通过使用sympy.combinatorics.partitions.RGS_enum()方法,我们能够获得大小为m的无限制增长字符串的总数。
# import sympy and RGS_generalized 
from sympy.combinatorics.partitions import RGS_enum 
from sympy import *
    
# Using sympy.combinatorics.partitions.RGS_enum() method 
gfg = RGS_enum(5) 
  
print(gfg)输出:
52
范例2:
# import sympy and RGS_generalized 
from sympy.combinatorics.partitions import RGS_enum 
from sympy import *
    
# Using sympy.combinatorics.partitions.RGS_enum() method 
gfg = RGS_enum(16) 
  
print(gfg)输出:
10480142147
相关用法
- Python sympy.Add()用法及代码示例
 - Python sympy.cos()用法及代码示例
 - Python sympy.sin()用法及代码示例
 - Python sympy.apart()用法及代码示例
 - Python sympy.gcd()用法及代码示例
 - Python sympy.sec()用法及代码示例
 - Python sympy.tan()用法及代码示例
 - Python sympy.det()用法及代码示例
 - Python sympy.crt()用法及代码示例
 - Python sympy.ones()用法及代码示例
 - Python sympy.has()用法及代码示例
 - Python sympy.nP()用法及代码示例
 - Python sympy.apart()用法及代码示例
 - Python sympy.Add()用法及代码示例
 - Python sympy.nC()用法及代码示例
 
注:本文由纯净天空筛选整理自Jitender_1998大神的英文原创作品 Python | sympy partitions.RGS_enum() method。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
