Source code for submission s943

fl.cpp

  1. #include <string.h>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int i, n, p;
  9. int pom;
  10.  
  11. while (true) {
  12. if ((scanf("%d/%d", &p, &n) < 2)) return 0;
  13.  
  14. pom = 0;
  15. for (i = n + 1; i <= 2 * n; i++) {
  16. if ((n * i) % (i - n) == 0) pom++;
  17. }
  18.  
  19. printf("%d\n", pom);
  20. }
  21. return 0;
  22. }