Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits\stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- cin >> t;
- while(t--)
- {
- string s;
- cin >> s;
- int i, c0 = 0, c1 = 0;
- for(i = 0; i < s.length(); i++)
- {
- if(s[i] == '1') c1++;
- else c0++;
- }
- if(min(c0, c1) % 2 != 0) printf("DA\n");
- else printf("NET\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement