fork download
  1. var prime = [];
  2.  
  3. while(prime.length < 101){
  4. for( i = 0 ; i <= 1000; i++){
  5. for( j = 1; j <= i - 1; j++){
  6. if( j % i === 0){
  7. break;
  8. }
  9. if( i === j){
  10. prime.push(i);
  11. };
  12. };
  13. };
  14. print(prime);
  15. };
Time limit exceeded #stdin #stdout 5s 381952KB
stdin
Standard input is empty
stdout