The number 17, for example, is prime, because it is divisible only by 1 and 17.
例如17就是质数,因为它只能被1和17整除。
You could also write code that USES a positive integer's factors to determine if it is a prime number (defined as an integer greater than 1 whose only factors are 1 and the number itself).
您还可以编写代码,用一个正整数的因子来确定它是否为素数(定义为大于1的整数,该数字仅有的因子为1和本身)。
A prime number is an integer greater than or equal to 2 that has exactly two distinct natural number divisors, 1 and itself.
素数是指大于等于2且只有两个不同约数的整数:1和它自己。
应用推荐