#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
int isSkip(char x, const char* skip){
// x가 skip에 있는문자냐? 있따면 1리턴, 없다면 0 리턴
int a = 0;
for(int j=0;skip[j]!=0;j++)
{
if(skip[j]==x)
{
return 1;
}
}
return 0;
}
// 파라미터로 주어지는 문자열은 const로 주어집니다. 변경하려면 문자열을 복사해서 사용하세요.
char* solution(const char* s, const char* skip, int index) {
// return 값은 malloc 등 동적 할당을 사용해주세요. 할당 길이는 상황에 맞게 변경해주세요.
char* answer = (char*)malloc(sizeof(int)*(strlen(s)+1));
strcpy(answer, s);
answer[strlen(s)]='\0';
int i, j;
// s[i] -> answer[i]
// 'a' -> 'h'
for(i=0;s[i] !='\0';i++)
{
for(j=0;j<index;j++)
{
answer[i]++;
if(isSkip(answer[i], skip)==1){
j--;
}
}
if(answer[i]>122)
{
answer[i] = answer[i] - 26;
}
printf("%d", answer[i]);
}
return answer;
}