26 lines
433 B
C
Raw Normal View History

2023-12-01 13:35:13 +01:00
#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;
}