#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
// 多层加密函数
void multiLayerEncrypt(char *text, char **keys, int keyCount, char *result) {
int textLen = strlen(text);
for (int i = 0; i < textLen; i++) {
char c = text[i];
int shift = 0;
for (int j = 0; j < keyCount; j++) {
shift += keys[j][i % strlen(keys[j])] - 'a';
}
if (islower(c)) {
result[i] = (char) ((c - 'a' + shift) % 26 + 'a');
} else if (isupper(c)) {
result[i] = (char) ((c - 'A' + shift) % 26 + 'A');
} else {
result[i] = c;
}
}
result[textLen] = '\0&#