update
All checks were successful
Binary Search Test / test (push) Successful in 5s

This commit is contained in:
2026-02-17 09:35:39 +03:00
commit c4eaad130f
40 changed files with 3276 additions and 0 deletions

19
lectures/lec1/Magic.java Normal file
View File

@@ -0,0 +1,19 @@
public class Magic {
public static void main(String[] args) {
System.out.println(magic());
}
int magic(int a, int n) {
int r = 1;
while (n != 0) {
if (n % 2 == 1) {
r *= a;
}
n /= 2;
a *= a;
}
return r;
}
}