简体   繁体   English

是否有一个 function 通过它当 a 和 b 相乘时得到的 x 相同,并且 x 由用户给出

[英]Is there a function through which when a and b multiplies the resultant x is same,and x is given by the user

For example all combinations when multiplied together results in x=20.例如,当所有组合相乘时,x=20。 In first sequence, A = 2, B = 10.在第一个序列中,A = 2,B = 10。
2 x 10 = 20

5 x 4 = 20 etc

The sequences are required must be present in the list.需要的序列必须存在于列表中。

This is a general problem of number theory and there are several algorithms of varying complexity which can be used to perform an “integer factorisation”.这是数论的一个普遍问题,有几种复杂度不同的算法可用于执行“整数分解”。 The fastest would be the general number field sieve .最快的是通用数域筛 There are several good examples for quadratic sieves that you can compare as well (eg SIMPQS ).您也可以比较几个很好的二次筛示例(例如SIMPQS )。 If you aren't considering using it in a productive manner I recommend to look into Dixon's factorization method , since it's a bit more comprehensible.如果您不考虑以有效的方式使用它,我建议您研究Dixon 的分解方法,因为它更易于理解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找到包含整数的结果 - finding the resultant which contains the integers .Sort(Function(x,y)->在没有排序内容时(即所有排序字段具有相同的值)重新排列列表 - .Sort(Function(x, y) -> re-arranges list when there is nothing to sort (i.e., all sort fields have the same value) PYTHON:解决 y=a+b*x 其中 x 是预定义列表 - PYTHON: solving y=a+b*x where x is a predefined list prolog 是 X 数字 A、B、C 的中位数 - prolog is X the median of numbers A, B, C 通过“ for”循环(即“ for x in list:”)访问列表时,有没有办法在同一循环中访问列表中的“ x + 1”项目? - While accessing a list through a “for” loop i.e. “for x in list:” , is there a way to access the “x+1” item in the list in the same loop? 将格式为M = [((a,x),(b,y)]]的列表分成M1 = [a,b]和M2 = [x,y] - Separate lists of format M=[(a,x), (b,y)] into M1=[a,b] and M2=[x,y] 如何创建一个(x,y)列表,其中仅一个变量发生变化,而另一个保持不变? - How to create an (x,y) list in which only one of the variables change but the other one stays the same? 求解方案中给定值 x 的多项式 - Solve a polynomial for a given value x in scheme Function 将列表/数组的元素乘以 python 中的数字 - Function that multiplies element of a list/array by a number in python 删除具有相同 x 值的坐标 - Deleting coordinates with same x value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM