/* Name:poj 1218THE DRUNK JAILER Author:Unimen Date: 1/05/2011 9:34 Description:水题 */ #include <iostream> #include <cstring> using namespace std; int anCells[105]; int main() { int m, n, nCount; int i, j, p; while(cin>>m) { for(p=1; p<=m; ++p) { cin>>n; nCount = 0; memset(anCells, 0, sizeof(anCells)); for(i=2; i<=n; ++i) { for(j=1; j<=n; ++j) { if(0 == j%i) { if(0 == anCells[j]) anCells[j] = 1; else anCells[j] = 0; } } } for(i=1; i<=n; i++) { if(!anCells[i]) ++nCount; } cout<<nCount<<endl; } } return 0; }