#include <stdio.h>
#include <string.h>
int main() {
// 暗号化された文字列
char encrypted[] = "NMKHMD";
int shift = 33; // シフト量
char decrypted[sizeof(encrypted)]; // 復号化後の文字列を格納する配列
// 暗号化文字列を一文字ずつ復号化
for (int i
= 0; i
< strlen(encrypted
); i
++) { decrypted[i] = encrypted[i] + shift;
}
decrypted
[strlen(encrypted
)] = '\0'; // 文字列の終端にNULL文字を追加
printf("暗号化前の文字列は: %s\n", decrypted
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBtYWluKCkgewogICAgLy8g5pqX5Y+35YyW44GV44KM44Gf5paH5a2X5YiXCiAgICBjaGFyIGVuY3J5cHRlZFtdID0gIk5NS0hNRCI7CiAgICBpbnQgc2hpZnQgPSAzMzsgIC8vIOOCt+ODleODiOmHjwogICAgY2hhciBkZWNyeXB0ZWRbc2l6ZW9mKGVuY3J5cHRlZCldOyAgLy8g5b6p5Y+35YyW5b6M44Gu5paH5a2X5YiX44KS5qC857SN44GZ44KL6YWN5YiXCgogICAgLy8g5pqX5Y+35YyW5paH5a2X5YiX44KS5LiA5paH5a2X44Ga44Gk5b6p5Y+35YyWCiAgICBmb3IgKGludCBpID0gMDsgaSA8IHN0cmxlbihlbmNyeXB0ZWQpOyBpKyspIHsKICAgICAgICBkZWNyeXB0ZWRbaV0gPSBlbmNyeXB0ZWRbaV0gKyBzaGlmdDsKICAgIH0KICAgIGRlY3J5cHRlZFtzdHJsZW4oZW5jcnlwdGVkKV0gPSAnXDAnOyAgLy8g5paH5a2X5YiX44Gu57WC56uv44GrTlVMTOaWh+Wtl+OCkui/veWKoAoKICAgIHByaW50Zigi5pqX5Y+35YyW5YmN44Gu5paH5a2X5YiX44GvOiAlc1xuIiwgZGVjcnlwdGVkKTsKCiAgICByZXR1cm4gMDsKfQo=