fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.  
  5. int main(){
  6. int c = 0;
  7. scanf("%d", &c);
  8.  
  9. int count = 0;
  10.  
  11. for(int i = 0; i < c; i++){
  12. char s[100005] = {NULL};
  13. scanf("%s", &s);
  14.  
  15. int len = strlen(s);
  16.  
  17. if(len % 2 == 1) break; // 단어의 길이가 홀수라면 애초에 '좋은 단어'가 아니다(예제 2 참조)
  18. else {
  19. printf("%d", len);
  20. }
  21. }
  22. }
Success #stdin #stdout 0.01s 5360KB
stdin
3
AAA
AA
AB
stdout
Standard output is empty