Ví dụ như Bài Lũy Thừa thì mình cho nó lặp vô hạn có điều kiện dừng không?
Ví dụ bài Ceasar code nó bị Time Limit Exceeded?
PHP Code:
main()
{
char s[100];
while(1)
{
gets(s);
if(s[0]=='\0') break;
if(s[0]=='~')
{
decryption(s,ch2num(s[1]));
printf("%s\n",s);
}
else printf("%s\n",s);
}
}
Leave a comment: