Source code for submission s850

fl.c

  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n = 0, x = 0, poc = 0, y = 0;
  5.  
  6. while(1) {
  7. scanf("1/%d\n", &n);
  8. x = n;
  9. poc = 0;
  10.  
  11. do {
  12. x++;
  13. y = (-n * x) / (n - x);
  14. if((-n * x) % (n - x) == 0) poc++;
  15. }while(x <= y);
  16. printf("%d\n", poc);
  17.  
  18. if(feof(stdin)) break;
  19. }
  20.  
  21. return 0;
  22. }
  23.  
  24.