为什么测试点2,3,4一直过不了?
#include <stdio.h>
#include <string.h>
int main() {
int count = 0;
int hash[255] = {0};
char brokey[50];
gets(brokey);
int len = strlen(brokey);
char putstr[100];
gets(putstr);
int len1 = strlen(putstr);
if(len1!=0){
for (int i = 0; i < len; i++) {
hash[brokey[i] - '0'] = 1;
if(brokey[i]=='+'){ //如果是'+',所有大写字母标为1
for(int i='A'-'0';i<='Z'-'0';i++){
hash[i] = 1;
}
}
if(brokey[i]>='A'&&brokey[i]<='Z')
hash[(brokey[i]+32)-'0'] = 1; //标记对应小写字母
}
for(int i = 0;i<len1;i++){
if(hash[putstr[i]-'0']==0){
printf("%c",putstr[i]);
count = 1;
}
}
}
if(count==0)
printf("\n");
return 0;
}