jakaria_hossain

lightoj - 1015 - Brush (I)

Jul 31st, 2019
121
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. int main()
  5. {
  6. int t,c;
  7. cin>>t;
  8. for(c=1;c<=t;c++)
  9. {
  10. int n,x,sum=0;
  11. cin>>n;
  12. for(int j=0;j<n;j++)
  13. {
  14. cin>>x;
  15. if(x>=0)
  16. sum+=x;
  17. }
  18. cout<< "Case "<<c<< ": "<<sum<<endl;
  19. }
  20. }
RAW Paste Data