很简单的一题,但是为什么不AC。
这道题:https://www.我写的是这样的,给出的三个例子都能通过,但是一直不能AC。

#include <stdio.h> int main() { char a[30][2]={ 0 },i; int x,count=0; scanf("%d",&x); scanf("%c",&i); //获取换行 while(x--) { gets(a[x]); if(a[x][0]!=a[x+1][0]) count++; } scanf("%c",&i);//获取换行 printf("%d",count+1); return 0; }
求抱大佬大腿,我怎么错了

[此贴子已经被作者于2019-8-18 12:29编辑过]