|
|
вернуться в форумWHY WA 10# ? my code! please help! thanks! #include<stdio.h> #include<math.h> long i, j, n, div, p, a; int main() { scanf("%ld", &n); for(i = sqrt(n); i >= 1; i--) if(n % i == 0) { p = i * 2; a = n / (p / 2) - (p - 1); if(a % 2 == 0 && a / 2 >= 0) { a = a / 2; i = 0; } } printf("%ld %ld\n", a, p); return 0; } Edited by author 20.04.2007 13:25 Edited by author 20.04.2007 13:25 |
|
|