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;
- for(int i=1;i<=t;i++)
- {
- int x,sum=0;
- cin>>x;
- for(int j=1;j<=x;j++)
- {
- int y;
- cin>>y;
- if(y>0)
- {
- sum+=y;
- }
- }
- cout<<"Case"<<" "<<i<<":"<<" "<<sum<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement