fork download
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. int t,n,j,c;
  7. char ch;
  8. scanf("%d",&t);
  9. while(t>0)
  10. {
  11. j=0,c=0;
  12. scanf("%d",&n);
  13. while(n>0)
  14. {
  15. scanf("%c",&ch);
  16. if(ch==' ')
  17. continue;
  18. else
  19. {
  20. if(ch>='A'&& ch<='Z')
  21. c++;
  22. else
  23. j++;
  24. n--;
  25. }
  26. }
  27. if(j>c)
  28. printf("NUMBER\n");
  29. else
  30. printf("ALPHABET\n");
  31. t--;
  32. }
  33. }
Success #stdin #stdout 0s 4464KB
stdin
1
3
3 T O
stdout
NUMBER