#include <stdio.h>
void apply_caesar_cipher(char* str) {
while (*str != '\0') { // 문자열 끝에 도달할 때까지 반복
if (*str == 'i') {
*str = '!'; // 'i'를 '!'로 바꿈
}
str++; // 다음 문자로 이동
}
}
int main() {
char input[100]; // 입력 받을 문자열
fgets(input
, sizeof(input
), stdin
); // 문자열 입력 받기
apply_caesar_cipher(input); // 시저 암호 적용
printf("Encrypted string: %s\n", input
); // 결과 출력
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGFwcGx5X2NhZXNhcl9jaXBoZXIoY2hhciogc3RyKSB7CiAgICB3aGlsZSAoKnN0ciAhPSAnXDAnKSB7ICAvLyDrrLjsnpDsl7Qg64Gd7JeQIOuPhOuLrO2VoCDrlYzquYzsp4Ag67CY67O1CiAgICAgICAgaWYgKCpzdHIgPT0gJ2knKSB7CiAgICAgICAgICAgICpzdHIgPSAnISc7ICAvLyAnaSfrpbwgJyEn66GcIOuwlOq/iAogICAgICAgIH0KICAgICAgICBzdHIrKzsgIC8vIOuLpOydjCDrrLjsnpDroZwg7J2064+ZCiAgICB9Cn0KCmludCBtYWluKCkgewogICAgY2hhciBpbnB1dFsxMDBdOyAgLy8g7J6F66ClIOuwm+ydhCDrrLjsnpDsl7QKCiAgICBwcmludGYoIkVudGVyIGEgc3RyaW5nOiAiKTsKICAgIGZnZXRzKGlucHV0LCBzaXplb2YoaW5wdXQpLCBzdGRpbik7ICAvLyDrrLjsnpDsl7Qg7J6F66ClIOuwm+q4sAoKICAgIGFwcGx5X2NhZXNhcl9jaXBoZXIoaW5wdXQpOyAgLy8g7Iuc7KCAIOyVlO2YuCDsoIHsmqkKCiAgICBwcmludGYoIkVuY3J5cHRlZCBzdHJpbmc6ICVzXG4iLCBpbnB1dCk7ICAvLyDqsrDqs7wg7Lac66ClCgogICAgcmV0dXJuIDA7Cn0K