rengetsu

Timus_2100

Jul 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. //Timus 2100
  2. #include <string>
  3. #include <cstring>
  4. #include <iostream>
  5. using namespace std;
  6. int main()
  7. {
  8.     int n, len, answ=200;
  9.     char mass[42];
  10.     string s;
  11.     cin >> n;
  12.     for(int i=0;i<n;i++)
  13.     {
  14.         cin >> s;
  15.         len = s.size();
  16.         strcpy(mass, s.c_str());
  17.         if(mass[len-4]=='+'){answ+=200;}
  18.         else{answ+=100;}
  19.     }
  20.     if(answ==1300){cout<<"1400";}
  21.     else{cout<<answ;}
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment