#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char convert_to_char_code(char str[]) {
int num = (int)strtol(str, (char**)NULL, 10);
return num + 96;
}
void decrypt(char s[], char result[]) {
int i = 0, j = 0;
while (i < strlen(s)) {
char ch, buffer[3] = "";
if (s[i + 2] == '#') {
memcpy(buffer, &s[i], 2);
ch = (char)convert_to_char_code(buffer);
i += 2;
}
else {
memcpy(buffer, &s[i], 1);
ch = (char)convert_to_char_code(buffer);
}
i++;
result[j++] = ch;
}
}
int main()
{
char result[128] = "";
decrypt("10#1426#25#524#", result);
puts(result);
return 0;
}
/*
run:
jadzyex
*/