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,2 @@
PpIiKkAaCcHhUu
001004006008010012014

View File

@ -0,0 +1,2 @@
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ .,?!0123456789
016009011001053016009011001

View File

@ -0,0 +1,26 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
char translationKey[256];
char c;
int i = 0;
while ((c = getchar()) != '\n') {
translationKey[i] = c;
i++;
}
while (1) {
int phrase;
int check = scanf("%3d", &phrase);
if (check != 1) {
break;
}
// printf("%d, %d\n", phrase, check);
printf("%c", translationKey[phrase-1]);
}
printf("\n");
return 0;
}

View File

@ -0,0 +1,26 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
char translationKey[256];
char c;
int i = 0;
while ((c = getchar()) != '\n') {
translationKey[i] = c;
i++;
}
while (1) {
int phrase;
int check = scanf("3%d", &phrase);
if (check != 1) {
break;
}
printf("%c\n", translationKey[phrase-1]);
}
printf("\n");
return 0;
}

Binary file not shown.