{"id":26652,"student_id":10,"content":"var list = [];\nfor(var i = 123; i \u003c= 9876; i++){\n var t = i.toString();\n if(i \u003c 1000){\n t = '0' + t;\n }\n if(t[0] != t[1] \u0026\u0026 t[0] != t[2] \u0026\u0026 t[0] != t[3] \u0026\u0026 t[1] != t[2] \u0026\u0026 t[1] != t[3] \u0026\u0026 t[2] != t[3]){\n list.push(t);\n }\n}\n\n\n\nwhile (list.length \u003e 1) {\n var ge = list[0];\n var an = check(ge);\n\n if (an/10 == 4) break;\n\n list.splice(0, 1);\n\n for (var i=0; i\u003clist.length; i++) {\n var a = 0;\n var b = 0;\n for (var z=0; z\u003c4; z++) {\n if (list[i].indexOf(ge[z]) != -1) {\n b++;\n }\n if (list[i][z] == ge[z]) {\n a++;\n b--;\n }\n }\n if (a != Math.floor(an/10) \u0026\u0026 b != an%10) {\n list.splice(i, 1);\n i--;\n }\n }\n};\n\nalert(list[0]);\n\n\n\n// for(var i = 0 ; i \u003c 8; i++){\n// // console.log('.');\n// var ge = list[0];\n// var an = check(list[0]);\n\n// if (an/4 == 0) break;\n\n// for(var x = 0 ; x \u003c list.length; x++){\n// var a = 0,b = 0; \n// for(var z = 0 ; z \u003c 4 ; z++){\n// if (list[x].indexOf(ge[z]) != -1) {\n// b++;\n// }\n// if (list[x][z] == ge[z]) {\n// a++;\n// b--;\n// }\n// }\n// if(a == an/10 || b == an%10){\n// list.splice (x, x+1);\n// }\n// }\n// }","created_at":"2018-04-20T13:59:48.108+08:00","updated_at":"2019-11-08T11:04:42.478+08:00","name":"1A2B","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/26652/80cf82deb54637b14048503d398bfe48.jpg"},"parent_id":26121,"plugin":"var h = [];\nvar answer = '';\n\nwhile (true) {\n // var rand = Math.floor(Math.random()*9);\n // if (answer.indexOf(rand) == -1) {\n // answer += rand;\n // }\n // if (answer.length == 4) {\n // break;\n // }\n answer = '9876';\n break;\n}\n\nvar check = function (g) {\n var a = 0,b = 0;\n h.push(g);\n for(var i = 0 ; i \u003c 4 ; i++){ \n\n if (answer.indexOf(g[i]) != -1) {\n b++;\n }\n if (answer[i] == g[i]) {\n a++;\n b--;\n }\n }\n h.push(a + \"A\" + b + \"B\");\n return a*10 + b;\n};\n\n\nforever(function(){\n for (var i=0; i\u003ch.length; i+=2) {\n print(h[i], 10, 10 + 20*i);\n print(h[i+1], 50, 10 + 20*i);\n }\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":314,"hashid":"882s48mn","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":492363,"file_name":"1.wav","project_id":26652,"asset_id":10,"created_at":"2018-04-20T13:59:48.117+08:00","updated_at":"2018-04-20T13:59:48.117+08:00"},{"id":492364,"file_name":"0.wav","project_id":26652,"asset_id":9,"created_at":"2018-04-20T13:59:48.119+08:00","updated_at":"2018-04-20T13:59:48.119+08:00"},{"id":492365,"file_name":"2.png","project_id":26652,"asset_id":8,"created_at":"2018-04-20T13:59:48.121+08:00","updated_at":"2018-04-20T13:59:48.121+08:00"},{"id":492366,"file_name":"1.svg","project_id":26652,"asset_id":7,"created_at":"2018-04-20T13:59:48.122+08:00","updated_at":"2018-04-20T13:59:48.122+08:00"},{"id":492367,"file_name":"0.png","project_id":26652,"asset_id":6,"created_at":"2018-04-20T13:59:48.124+08:00","updated_at":"2018-04-20T13:59:48.124+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦