fork download
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3. #define endl "\n"
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(false);
  9. cin.tie(NULL);
  10.  
  11. int n, x;
  12. cin >> n >> x;
  13. int sum = 0;
  14. for (int i = 1; i <= n; i++)
  15. {
  16. if (x / i <= n && x % i == 0)
  17. sum++;
  18. }
  19. cout << sum << endl;
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 2.42s 5292KB
stdin
Standard input is empty
stdout
8