Source code for submission s511

fl.cpp

  1. #include <iostream>
  2. #include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main ( void )
  7. {
  8. int n, count;
  9.  
  10. while ( scanf(" 1/%d", &n) == 1 ) {
  11. count = 0;
  12. int x;
  13. for(int k=n+1;;k++)
  14. {
  15. if( (k*n)%(k-n)==0 )
  16. {
  17. count++;
  18. x=(k*n)/(k-n);
  19. if(k >= x)
  20. break;
  21. }
  22. }
  23. cout << count << endl;
  24. }
  25.  
  26. return 0;
  27. }
  28.