#740: 一直TLE


h124224 (KLV)


以下是CODE

 

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    char x[999999];
    int i,temp;
   
    while (gets(x)!=EOF){
          for (i=0,temp=1;i<strlen(x);i++){
              if (x[i]==' ')
                 temp++;
          }
          printf("%d\n",temp);
    }
 
  system("PAUSE"); 
  return 0;
}

 

我自己執行的時候很正常..

請問有沒有人能告訴我為什麼會TLE @@

#766: Re:一直TLE


fuho (~)


system("PAUSE");

這行拿掉