Count primes

Time Limit: 6000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 5901
64-bit integer IO format: %I64d      Java class name: Main

Description

Easy question! Calculate how many primes between [1...n]!

Input

Each line contain one integer n(1 <= n <= 1e11).Process to end of file.

Output

For each case, output the number of primes in interval [1...n]

Sample Input

2
3
10

Sample Output

1
2
4

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .