Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- while(n--)
- {
- int a,count=0;
- bool b=0;
- cin>>a;
- for(int i=0;!b;i++)
- {
- count++;
- if(a==count)
- {
- cout<<1<<'\n';
- b=1;
- }
- for(int j=0;j<i;j++)
- {
- count++;
- if(count==a)
- {
- cout<<0<<'\n';
- b=1;
- }
- }
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment