Browse Source

little fix

Ethosa 3 năm trước cách đây
mục cha
commit
2e6e0c4e4d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Languages/js-rush/task8/main.js

+ 1 - 1
Languages/js-rush/task8/main.js

@@ -7,7 +7,7 @@ function main() {
 function legendre(p, n) {
     var sum = Math.floor(n/p)
         pow = p*p
-    while (n > pow){
+    while (n >= pow){
         sum += Math.floor(n/pow)
         pow *= p
     }