#include <stdio.h>
int fuzzyStrcmp(char s[], char t[]) {
int i = 0;
// 文字列sを大文字に変換
for (i = 0; s[i] != '\0'; i++) {
if (s[i] >= 'a' && s[i] <= 'z') {
s[i] = s[i] - 32; // 小文字を大文字に変換
}
}
// 文字列tを大文字に変換
for (i = 0; t[i] != '\0'; i++) {
if (t[i] >= 'a' && t[i] <= 'z') {
t[i] = t[i] - 32; // 小文字を大文字に変換
}
}
// 両方の文字列を比較
i = 0;
while (s[i] != '\0' && t[i] != '\0' && s[i] == t[i]) {
i++;
}
// 文字列が一致しているかどうかを確認
if (s[i] == '\0' && t[i] == '\0') {
return 1; // 完全に一致
} else {
return 0; // 異なる
}
}
int main() {
int ans;
char s[100];
char t[100];
ans = fuzzyStrcmp(s, t);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgZnV6enlTdHJjbXAoY2hhciBzW10sIGNoYXIgdFtdKSB7CiAgICBpbnQgaSA9IDA7CiAgICAKICAgIC8vIOaWh+Wtl+WIl3PjgpLlpKfmloflrZfjgavlpInmj5sKICAgIGZvciAoaSA9IDA7IHNbaV0gIT0gJ1wwJzsgaSsrKSB7CiAgICAgICAgaWYgKHNbaV0gPj0gJ2EnICYmIHNbaV0gPD0gJ3onKSB7CiAgICAgICAgICAgIHNbaV0gPSBzW2ldIC0gMzI7IC8vIOWwj+aWh+Wtl+OCkuWkp+aWh+Wtl+OBq+WkieaPmwogICAgICAgIH0KICAgIH0KCiAgICAvLyDmloflrZfliJd044KS5aSn5paH5a2X44Gr5aSJ5o+bCiAgICBmb3IgKGkgPSAwOyB0W2ldICE9ICdcMCc7IGkrKykgewogICAgICAgIGlmICh0W2ldID49ICdhJyAmJiB0W2ldIDw9ICd6JykgewogICAgICAgICAgICB0W2ldID0gdFtpXSAtIDMyOyAvLyDlsI/mloflrZfjgpLlpKfmloflrZfjgavlpInmj5sKICAgICAgICB9CiAgICB9CgogICAgLy8g5Lih5pa544Gu5paH5a2X5YiX44KS5q+U6LyDCiAgICBpID0gMDsKICAgIHdoaWxlIChzW2ldICE9ICdcMCcgJiYgdFtpXSAhPSAnXDAnICYmIHNbaV0gPT0gdFtpXSkgewogICAgICAgIGkrKzsKICAgIH0KCiAgICAvLyDmloflrZfliJfjgYzkuIDoh7TjgZfjgabjgYTjgovjgYvjganjgYbjgYvjgpLnorroqo0KICAgIGlmIChzW2ldID09ICdcMCcgJiYgdFtpXSA9PSAnXDAnKSB7CiAgICAgICAgcmV0dXJuIDE7IC8vIOWujOWFqOOBq+S4gOiHtAogICAgfSBlbHNlIHsKICAgICAgICByZXR1cm4gMDsgLy8g55Ww44Gq44KLCiAgICB9Cn0KCmludCBtYWluKCkgewogICAgaW50IGFuczsKICAgIGNoYXIgc1sxMDBdOwogICAgY2hhciB0WzEwMF07CiAgICBzY2FuZigiJXMgJXMiLCBzLCB0KTsKICAgIHByaW50ZigiJXMgPSAlcyAtPiAiLCBzLCB0KTsKICAgIGFucyA9IGZ1enp5U3RyY21wKHMsIHQpOwogICAgcHJpbnRmKCIlZFxuIiwgYW5zKTsKICAgIHJldHVybiAwOwp9Cg==