标签:
#include<stdio.h> main() { int b,a,t; char s[50],ch; scanf("%d\n",&t); while(t--) { b=a=0; scanf("%c",&ch); while(ch!=‘\n‘) { if(ch==‘F‘) a++; if(ch==‘M‘) b++; scanf("%c",&ch); } if(b==a) printf("LOOP\n"); else printf("NO LOOP\n"); } }
标签:
原文地址:http://www.cnblogs.com/scau-zk/p/4924546.html