Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- int n;
- cin >> n;
- int a[2] = {0};
- while(n--){
- string s;
- cin >> s;
- if(s[1] == '+'){
- a[0]++;
- } else{
- a[1]++;
- }
- }
- cout << a[0]-a[1];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement