/* version 2023-10-04 */ #include #include #include int val(int v) { char *_ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; char *__ = strchr(_, v); if (__ == NULL) abort(); return __-_; } int main(void) { int x, y, z; int c, d, e, f; while (1) { x = getchar(); y = getchar(); z = getchar(); if (x == '\n' || x == EOF) break; if (y == EOF || y == '\n') abort(); c = val(x); d = val(y); if (z == EOF || z == '\n') goto only_two; e = val(z); f = c + d*45 +e*45*45; putchar(f/256); putchar(f%256); continue; only_two: f = c + d*45; putchar(f); break; } fflush(stdout); return 0; }