Problem 44343. Pair Primes
Solution Stats
Problem Comments
-
4 Comments
there are quite a few look-up table solutions, could you perhaps add something like the following to the test suite to discourage these? assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[51,2485,136162,8578934]),regexp(fileread('pairPrimes.m'),'[\d\.\+\-\*\/]+','match'))))
Do you consider (13, 31) and (31, 13) as the same or different pair primes? Similarly, how about (79, 97) and (97, 79)?
感谢您指出的。他们是不同的素数。
好问题。起初,我认为我们需要扭转数字,但是只有它们的顺序是必要的。我们需要计算两次数字,例如31和13。
Solution Comments
-
1 Comment
你能比这更好吗?
Problem Recent Solvers96
Suggested Problems
143 Solvers
312 Solvers
174个求解器
写一个函数,接受一个行向量v和returns a matrix H as follows..
552 Solvers
296 Solvers