题目描述
思路分析
直接暴力
代码实现
package TEST;public class Main {public static void main(String[] args) {long n = 59084709587505L, cnt = 0;for (long a = 1; a <= n; a *= 3)for (long b = 1; b <= n; b *= 5)for (long c = 1; c <= n; c *= 7)if (a * b * c <= n && a * b * c > 0) cnt++;System.out.print(cnt - 1);}
}
答案
1905