poj 1218 THE DRUNK JAILER

#include<iostream>
using namespace std;
int list[101];
int main()
{
int t,n,i,round,sum;
cin
>>t;while(t--)
{
cin
>>n;
memset(list,
0,sizeof(list));
for(round=1;round<=n;round++)
for(i=round;i<=n;i+=round)
list[i]
++;
sum
=0;
for(i=1;i<=n;i++)
if(list[i]%2)
sum
++;
cout
<<sum<<endl;
}
return 0;
}

  

posted on 2011-07-17 23:55  sysu_mjc  阅读(89)  评论(0编辑  收藏  举报

导航