{"id":159727,"student_id":10,"content":"//noprotect\n\nvar startTime = Date.now();\nvar best;\n\n// for (var i=0; i\u003c=100000; i++) { \n// if (isPrime(i)) best = i;\n// }\n\n// function isPrime (n) {\n// for (var i = 2; i \u003c n; i++) {\n// if (n % i == 0) {\n// return false;\n// }\n// }\n// return true;\n// }\n\n// function isPrime (n) {\n// if (n % 2 == 0) return false;\n// for (var i = 3; i\u003cn; i += 2) {\n// if (n % i == 0) return false;\n// }\n// return true;\n// }\n\nfunction isPrime (n) {\n \n if (n % 2 == 0) return;\n \n var nSqrt = Math.floor(Math.sqrt(n));\n \n for (var i = 2; i \u003c= nSqrt; i++) {\n if (n % i == 0) return false;\n }\n return true;\n}\n\nvar time = Date.now() - startTime;\n\nconsole.log(`花費時間 ${time} ms`);\n// console.log(`找到最大質數 ${best}`);\n","created_at":"2020-06-18T18:50:21.475+08:00","updated_at":"2020-07-15T16:46:40.507+08:00","name":"尋找質數_講解效率_概念","language":"javascript","screenshot":{"url":"/uploads/project/screenshot/159727/fd1ac05835b665cf0d7e3c5532c7c2d7.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":445,"hashid":"gk4sd58k","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer