Problem hidden

SIOENES - Eratosthenes Prime numbers

Given an integer 'N', print count all the prime numbers which are less than or equal to 'N'.

Input description

First line of input is an integer T (number of testcases) and integer T will be followed by T lines, where each line will contain an integer N.

Output description

Output will consists of T lines. Each line will have count of prime numbers not greater than 'N'.

Constraint

1<=T<=10000

1<=N<=1000000

Example

Input:
2
9
11

output
4
5

Adicionado por:codesmiler
Data:2021-06-03
Tempo limite:1s
Tamanho do fonte:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Linguagem permitida:Todas exceto: ASM64 CLOJURE ERL FSHARP PERL6 PY_NBC SCALA TCL
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.