Advertisement
DBP625

Brush-1

Apr 4th, 2022
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t;
  6. cin>>t;
  7. for(int i=1;i<=t;i++)
  8. {
  9. int x,sum=0;
  10. cin>>x;
  11. for(int j=1;j<=x;j++)
  12. {
  13. int y;
  14. cin>>y;
  15. if(y>0)
  16. {
  17. sum+=y;
  18. }
  19. }
  20. cout<<"Case"<<" "<<i<<":"<<" "<<sum<<endl;
  21. }
  22.  
  23. }
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement