Skip to content

Commit c3733a9

Browse files
committedAug 25, 2020
Create bit++_282A.cpp
1 parent bf8325c commit c3733a9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

Diff for: ‎bit++_282A.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <iostream>
2+
#include <string>
3+
4+
using namespace std;
5+
6+
int main()
7+
{
8+
int n, x(0);
9+
cin >> n;
10+
11+
string s;
12+
while (n--)
13+
{
14+
cin >> s;
15+
if (s[1] == '+')
16+
{
17+
++x;
18+
}
19+
else
20+
{
21+
--x;
22+
}
23+
}
24+
25+
cout << x << endl;
26+
return 0;
27+
}

0 commit comments

Comments
 (0)
Please sign in to comment.