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

請您先登陸,再發跟帖!