#include <stdio.h>
#include <string.h>
int main(){
int n,i=0,count=0;
char s[100000],s1,*s2;//s装字符串的每一个字符,s1是字符串,strstr要求返回值为指针
scanf("%d",&n);
getchar();
while( (s1=getchar())!='#' ){
s[i++]=s1;
}
while ( (s2=strstr(s,"(zhangsheng)")) !=NULL){
count++;
*s2=' ';
}
if(count>=n){ printf("%d True",count); }
else { printf("%d False",count);}
return 0;
}
pat乙级2022冬季考试 B-1 谣言检测仪
最新推荐文章于 2024-07-15 23:55:55 发布