题目描述
We define Shuaishuai-Number as a number which is the sum of a prime square(平方), prime cube(立方), and prime fourth power(四次方).
The first four Shuaishuai numbers are:
How many Shuaishuai numbers in [1,n]? (1<=n<=50 000 000)
输入描述:
The input will consist of a integer n.
输出描述:
You should output how many Shuaishuai numbers in [1...n]
示例1
输入
28
输出
1
说明
There is only one Shuaishuai number
链接:https://ac.nowcoder.com/acm/problem/14615
来源:牛客网
分析:
本题n的数据范围是1到5000万,大约估计一下,用到的素数小于8000,因为8000的平方为6400万,7000的平方为4900万,无聊实测,素数打表到7070即可,即用到的素数最大为7069&