2014
02-12

# 0 or 1

Solving problem is a interesting thing. Yifenfei like to slove different problem,because he think it is a way let him more intelligent. But as we know,yifenfei is weak in math. When he come up against a difficult math problem, he always try to get a hand. Now the problem is coming! Let we
define T(n) as the sum of all numbers which are positive integers can divied n. and S(n) = T(1) + T(2) + T(3)…..+T(n).

The first line of the input contains an integer T which means the number of test cases. Then T lines follow, each line consists of only one positive integers n. You may assume the integer will not exceed 2^31.

The first line of the input contains an integer T which means the number of test cases. Then T lines follow, each line consists of only one positive integers n. You may assume the integer will not exceed 2^31.

3
1
2
3 

1
0
0

HintHint S(3) = T(1) + T(2) +T(3) = 1 + (1+2) + (1+3) = 8
S(3) % 2 = 0  

#include<stdio.h>
#include<string.h>
int main()
{
int i,j,n,t,sum;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
sum=0;
for(i=1;i<=n;i++)
{

if(2*i*i<=n)
sum++;
if(i*i<=n)
sum++;
else break;
}
printf("%d\n",sum%2);
}
return 0;
}

1. 学算法中的数据结构学到一定程度会乐此不疲的，比如其中的2－3树，类似的红黑树，我甚至可以自己写个逻辑文件系统结构来。

2. 第2题，TCP不支持多播，多播和广播仅应用于UDP。所以B选项是不对的。第2题，TCP不支持多播，多播和广播仅应用于UDP。所以B选项是不对的。