#include<iostream>
#include<cstring>
using namespace std;
const int maxn = 100000;
int a[maxn+1];
int main()
{
memset(a, 0, sizeof(a));
for(int i = 1; i <= maxn; i++)
for(int j = 1; j*i <= maxn; j++)
{
if(a[i*j])
a[i*j] = 0;
else
a[i*j] = 1;
}
int n;
while(cin >> n)
{
cout << a[n] << endl;
}
return 0;
}
hdu2053
最新推荐文章于 2019-05-20 20:12:00 发布