Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <iostream>
- using namespace std;
- int main ()
- {
- ios::sync_with_stdio(false);
- cin.tie(0);
- freopen("even-or-odd.in", "r", stdin);
- freopen("even-or-odd.out", "w", stdout);
- long long n,k;
- cin>>n;
- for (int i=0; i<n; i++) {
- cin>>k;
- if ((int)sqrt(k)*(int)sqrt(k)==k) cout<<1;
- else cout<<0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement