Thats correct answer. I just wrote a simple JavaScript to find it. var prisons=new Array(101); for(var i=0; i<prisons.length; i++){ prisons[i]=false; } for(var i=1; i<=100; i++){ for(var j=1; j<=100; j++){ if(i%j == 0){ prisons[i]= !prisons[i]; } } } var res = []; for(var i=1; i<prisons.length; i++){ if(prisons[i]){ res.push(i); } } alert(res.join(","));
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.