Saleh127

Live ar 7035

Nov 28th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. test
  11. {
  12. ll a,b,c,d,e=0,i,j,k,l;
  13. cin>>a;
  14. for(i=0;i<a;i++)
  15. {
  16. cin>>b;
  17. if(b%3!=0)
  18. {
  19. e=1;
  20. }
  21. }
  22. if(e) cout<<"Case #"<<cs<<": No"<<endl;
  23. else cout<<"Case #"<<cs<<": Yes"<<endl;
  24. }
  25.  
  26.  
  27. return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment