Source code for submission s791

fl.cpp

  1. #include <cstdio>
  2. #include <cmath>
  3.  
  4. int main()
  5. {
  6. int N, one;
  7.  
  8. while(scanf("%d/%d\n", &one , &N) == 2)
  9. {
  10. int matches = 0;
  11. int X;
  12. for (X = N+1; X <= N*2; ++X) {
  13. if ((X*N)%(X-N) == 0)
  14. ++matches;
  15. }
  16.  
  17. printf("%d\n", matches);
  18. }
  19.  
  20. return 0;
  21. }
  22.