Advertisement
ThaiPeen

timus 2100

Apr 29th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include<cstdlib>
  4. #include<algorithm>
  5. #include<cmath>
  6. #include<cstring>
  7. using namespace std;
  8. const int MAXN = 20;
  9. int main() {
  10.     int n, cnt = 0;
  11.     bool o = 0;
  12.     char k = '+';
  13.     string a;
  14.     cin >> n;
  15.     for (int i = 0; i < n; i++) {
  16.         cin >> a;
  17.         for (int h = 0; ; h++) {
  18.             if (k == a[h]) {
  19.                 o = 1;
  20.                 break;
  21.             }
  22.             else if (a[h] == '\0')
  23.                 break;
  24.         }
  25.         if (o == 1)
  26.             cnt += 2;
  27.         else cnt++;
  28.         cout << '\n';
  29.         o = 0;
  30.     }
  31.     if (cnt == 11)
  32.         cout << cnt * 100 + 300;
  33.     else cout << cnt * 100 + 200;
  34.     system("pause");
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement