|
- #include<cstdio>
- #include<time.h>
- using namespace std;
- int const maxn=1e9+10;
- bool b[maxn];
- int n,a=0,t=1,x;
- int main()
- {
- while(t<=maxn)
- {
- b[t]=1;
- a++;
- t+=a;
- }
- scanf("%d",&n);
- for(int i=1;i<=n;i++)
- {
- scanf("%d",&x);
- printf("%d\n",b[x]);
- }
- return 0;
- }
复制代码 |
|