Saleh127

Untitled

Apr 18th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t,b,c,d,e,f,i,j,k,l;
  6. cin>>t;
  7. while(t--)
  8. {
  9. b=0;
  10. d=0;
  11. e=0;
  12. string a;
  13. cin>>a;
  14. for(i=0;i<a.size();i++)
  15. {
  16. c=a[i]-'0';
  17. b+=c;
  18. if(c%2==0) d++;
  19. if(c==0) e++;
  20. }
  21. if(b%3==0 && d>1 && e>0) cout<<"red\n";
  22. else cout<<"cyan\n";
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment