Untitled
#include <stdio.h> #include <string.h> int main() { int t,count1=0,count2=0; scanf("%d",&t); for (int i = 1; i <=t; i++) { int k; scanf("%d",&k); char n[k],start[]="START38",ltime[]="LTIME108"; for (int j = 0; j < k; j++) { int ms=strcmp(n,start); int ks=strcmp(n,ltime); scanf("%s",&n[j]); if (ms==0) { count1++; } else if (ks==0) { count2++; } } printf("%d %d",count1,count2); } return 0; }