C. 作业题 - 输出质数个数

    Type: Default 1000ms 256MiB

作业题 - 输出质数个数

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

编一个程序,计算1∼n 范围内素数的个数。

输入

包括多组数据(不超过 100 组),每组数据仅有一个整数 n (1≤n≤500000 ),输入以 0 结束。

输出

对于每组数据输入,输出一行,为 1∼n (包括 n )之间的素数的个数。

样例

输入

1
10
65
100
0

输出

0
4
18
25