initial commit
This commit is contained in:
parent
60c5d4cda4
commit
2a9c7400eb
18
282A-Bit++/282A.cpp
Normal file
18
282A-Bit++/282A.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int n, x = 0;
|
||||||
|
cin >> n;
|
||||||
|
while (n--)
|
||||||
|
{
|
||||||
|
char op[4];
|
||||||
|
cin >> op;
|
||||||
|
if (op[1] == '+')
|
||||||
|
x++;
|
||||||
|
else if (op[1] == '-')
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
cout << x << endl;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user