Source code for submission s524

fl.cpp

  1. #include <algorithm>
  2. #include <cmath>
  3. #include <cstdio>
  4. #include <cstdlib>
  5. #include <iostream>
  6. #include <sstream>
  7. #include <map>
  8. #include <set>
  9. #include <queue>
  10. #include <vector>
  11.  
  12. using namespace std;
  13.  
  14. #define FOR(prom, a, b) for(int prom = (a); prom < (b); prom++)
  15. #define FORD(prom, a, b) for(int prom = (a); prom > (b); prom--)
  16. #define FORDE(prom, a, b) for(int prom = (a); prom >= (b); prom--)
  17.  
  18. #define PB push_back
  19. #define MP make_pair
  20.  
  21. #define MM(co, cim) memset((co), (cim), sizeof((co)))
  22.  
  23. #define DEB(x) cerr << ">>> " << #x << " : " << x << endl;
  24.  
  25. int main ()
  26. {
  27. int n;
  28. while(scanf(" 1/%d", &n) == 1) {
  29. int y, res = 0;
  30. for(y = n+1; y <= 2*n; y++) {
  31. if((n*y) % (y-n) == 0) res++;
  32. }
  33. printf("%d\n", res);
  34. }
  35. return 0;
  36. }
  37.