Moved kattis from Uni repo

This commit is contained in:
2023-12-01 13:35:13 +01:00
parent 28a6b807a3
commit aaa2c123b8
164 changed files with 3008 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Obi-Wan Kenobi
69
80
-11

View File

@ -0,0 +1,4 @@
Grogu
67
17
50

View File

@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int a, b, diff;
char c;
while ((c=getchar()) != '\n' ) {
continue;
}
scanf("%d %d %d", &a, &b, &diff);
if (abs(a-b) == diff && a - b != diff) {
printf("SITH\n");
} else if (a - b == diff && abs(a-b) != diff ) {
printf("JEDI\n");
} else {
printf("VEIT EKKI\n");
}
return 0;
}

View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
int absolute(int x) {
return x < 0 ? -x : x;
}
int main(int argc, char **argv) {
int a, b, diff;
char c;
while ((c=getchar()) != '\n' ) {
continue;
}
scanf("%d %d %d", &a, &b, &diff);
if (absolute(a-b) == diff) {
printf("SITH\n");
} else if (a - b == diff && absolute(a-b) != diff) {
printf("JEDI\n");
} else {
printf("VEIT EKKI\n");
}
return 0;
}

Binary file not shown.