Untitled
unknown
c_cpp
3 years ago
374 B
4
Indexable
#include <bits/stdc++.h> using namespace std; int main() { int n, x, count = 0; cin >> n >> x; /*for (int i = 1; i <= n; i++ ) { for (int j = 1; j <= n; j++ ) { if((i*j) == x) count++; } }*/ for (int i = 1; i <= n ; i++ ) { if(x%i==0 && (x/i)<= n) count++; } cout << count; return 0; }
Editor is loading...