输入输出样例
输入 #1
5 5 1 2 3 4 5
输出 #1
4
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
constexpr int N = 1e5 + 10, inf = 0x3f3f3f3f;
int arr[N];
void solve()
{
int n, k;
cin >> n >> k;
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
int ans = 0;
for (int i = 0; i < n; i++)
{
for (int j = i + 1; j < n; j++)
{
if (arr[i] * arr[j] <= k)
{
// cout << arr[i] << ' ' << arr[j] << endl;
ans++;
}
}
}
cout << ans << endl;
}
signed main()
{
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
solve();
return 0;
}