#include<cstdio>
#include<cstring>
using namespace std;
int n;
char s[100001],table[]="luvletter";
int main()
{
scanf("%d",&n); getchar();
for(;n;--n)
{
gets(s);
int m=strlen(s),ans=0,p=0;
for(int i=0;i<m;++i)
if(s[i]==table[p])
{
if(p==8) ++ans;
p=(p+1)%9;
}
printf("%d\n",ans);
}
return 0;
}
转载于:https://www.cnblogs.com/autsky-jadek/p/4205360.html