fork download
  1. #include<stdio.h>
  2. int main(void)
  3. {
  4. int bu[5]={0,0,0,0,0},t=5,c=0,count=0,i;
  5. char str[11];
  6. while(t--)
  7. {
  8. scanf("%s",str);
  9. for(i=0;i<strlen(str)-3;i++)
  10. if(str[i]=='F'&&str[i+1]=='B'&&str[i+2]=='I')
  11. bu[c]++;
  12. c++;
  13. }
  14. for(i=0;i<5;i++)
  15. if(bu[i]!=0) {printf("%d ",i+1); count=1;}
  16. if(count==0)
  17. printf("HE GOT AWAY!");
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 2280KB
stdin
N-FBI1 

9A-USKOK 

I-NTERPOL 

G-MI6 

RF-KGB1 
stdout
Standard output is empty