One statement Solution in Matlab

% p is the positive integer.
% ans 1 for prime, 0 for non-prime.

min ( rem (p, [2:p-1]) )

所有跟帖: 

Ahhhhh :) -botong- 给 botong 发送悄悄话 botong 的博客首页 (0 bytes) () 07/26/2009 postreply 12:15:18

how about this -dynamic- 给 dynamic 发送悄悄话 (10 bytes) () 07/26/2009 postreply 21:11:51

Haskell 回复:One statement Solution in Matlab -火球魔法- 给 火球魔法 发送悄悄话 火球魔法 的博客首页 (40 bytes) () 08/06/2009 postreply 19:03:53

请您先登陆,再发跟帖!