AlgorithmOJ
Problem
Local Problems
All Problems
Problem Category
Status
Contest
Standard Contests
Replay Contests
Virtual Contests
Ranklist
More...
News
About
F.A.Q
Recent Contests
Coming Soon...
Login
Register
2026-09-29 04:13:32
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
Prev
Submit
Status
Statistics
Next
Font Size:
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
2016 ACM/ICPC Asia Regional Shenyang Online
Language:
C++
C++11
C++14
C
Java
Pascal
Python2
Python3
C#
Fortran
Perl
Ruby
Ada
SML
Visual C++
Visual C
CLang
CLang++
Theme:
Monokai
Solarized Light
Material
Share Code?
Yes
No
×
Login
Username:
Password:
Cookie:
Never
One Day
One Week
One Month
One Year
×
Register
Username:
Password:
Repeat Password:
Nickname:
School:
Email:
×
News Title
by