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