代码如下:
#include <iostream>
#include <cmath>
using namespace std;
typedef long long LL;
LL n = 59084709587505;
LL ans = 0;int main() {for (int i = 0; pow(3, i) < n; i++)for (int j = 0; pow(5, j) < n; j++)for (int k = 0; pow(7, k) < n; k++) {if (pow(3, i)*pow(5, j)*pow(7, k) < n)ans++;}cout << ans << endl;return 0;
}