|
|
back to boardWhy WA??????????????????? #include <stdio.h> int K, L, i; int main() { scanf("%d", &K); for (L=2; L<K; L++) for (i=1; i<L; i++) if ((K-L-1)%(L+i)==0) goto stop; stop: printf("%d", L); return 0; } Re: Why WA??????????????????? Posted by ilyamit 16 Oct 2007 23:56 Sorry my bad english. 1) You solve is "ploho_chitaetsya))" 2) You solve is very long. The AC solve run for O(n^(1/2)), or O(sqrt(n)). |
|
|