corregir ejercicio 1

This commit is contained in:
PC de clase committed 2026-10-26 12:44:03 +01:00
1 parent 35b63ac2b1
commit 591c09e37a
1 file changed
+1 -1
+1 -1
View File
@@ -4,7 +4,7 @@ public class Metodos1{
}
public static int potencias2(int n){
int result = 1;
while(result <= n) result = result << 1;
while(1 << result <= n) result++;
return result;
}
}