first commit

This commit is contained in:
me
2026-04-08 21:25:17 +03:00
parent 3681b8eccd
commit 371b14c5e3
173 changed files with 14126 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;
}
}