migration

This commit is contained in:
root
2026-04-13 20:12:01 +03:00
commit 46ab1753a5
201 changed files with 16685 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;
}
}