好像在线编译器版本对多维字符串的支持不是很好… 这道题我本来
int main() { int t; scanf(“%d”,&t); char p[t][10001]; int i,j; int character,number,others; int first=1; for(i=0;i<t;i++) { getchar(); scanf(“%[^\n]”,p[i]); } for(i=0;i=48&&p[i][j]<=57) { number++; } else if((p[i][j]>=65&&p[i][j]<=90)||(p[i][j]>=97&&p[i][j]<=122)) { character++; } else { others++; } } printf(“character:%d\n”,character); printf(“number:%d\n”,number); printf(“others:%d”,others); first=0; } return 0; } 这么写就wrong answer
int main() { int t; scanf(“%d”,&t); char p[10001]; int i,j; int character,number,others; int first=1; for(i=0;i=48&&p[j]<=57) { number++; } else if((p[j]>=65&&p[j]<=90)||(p[j]>=97&&p[j]<=122)) { character++; } else { others++; } } printf(“character:%d\n”,character); printf(“number:%d\n”,number); printf(“others:%d”,others); first=0; } return 0; } 这么写就yes…(本地测试没有问题的情况下
好像在线编译器版本对多维字符串的支持不是很好…
这道题我本来
include
include
int main()
{
int t;
scanf(“%d”,&t);
char p[t][10001];
int i,j;
int character,number,others;
int first=1;
for(i=0;i<t;i++)
{
getchar();
scanf(“%[^\n]”,p[i]);
}
for(i=0;i=48&&p[i][j]<=57)
{
number++;
}
else if((p[i][j]>=65&&p[i][j]<=90)||(p[i][j]>=97&&p[i][j]<=122))
{
character++;
}
else
{
others++;
}
}
printf(“character:%d\n”,character);
printf(“number:%d\n”,number);
printf(“others:%d”,others);
first=0;
}
return 0;
}
这么写就wrong answer
include
include
int main()
{
int t;
scanf(“%d”,&t);
char p[10001];
int i,j;
int character,number,others;
int first=1;
for(i=0;i=48&&p[j]<=57)
{
number++;
}
else if((p[j]>=65&&p[j]<=90)||(p[j]>=97&&p[j]<=122))
{
character++;
}
else
{
others++;
}
}
printf(“character:%d\n”,character);
printf(“number:%d\n”,number);
printf(“others:%d”,others);
first=0;
}
return 0;
}
这么写就yes…(本地测试没有问题的情况下