summaryrefslogtreecommitdiff
path: root/282A
diff options
context:
space:
mode:
authormjkwiatkowski <mati.rewa@gmail.com>2026-06-01 14:34:18 +0200
committermjkwiatkowski <mati.rewa@gmail.com>2026-06-01 14:34:18 +0200
commit7172d4f401f22192abc1e116a9a88c5078eb082f (patch)
tree65b099c01ddea514a99ad68bd6306fed1a6f8b67 /282A
initial commitHEADmaster
Diffstat (limited to '282A')
-rwxr-xr-x282A/mainbin0 -> 24792 bytes
-rw-r--r--282A/main.cpp25
2 files changed, 25 insertions, 0 deletions
diff --git a/282A/main b/282A/main
new file mode 100755
index 0000000..4f4162e
--- /dev/null
+++ b/282A/main
Binary files differ
diff --git a/282A/main.cpp b/282A/main.cpp
new file mode 100644
index 0000000..b40012d
--- /dev/null
+++ b/282A/main.cpp
@@ -0,0 +1,25 @@
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+int main(){
+ string a;
+ getline(cin, a);
+ int b = stoi(a);
+ int c = 0;
+ for(int i = 0; i < b; i++){
+ getline(cin, a, '\n');
+ if(a.compare("X++") == 0){
+ c++;
+ } else if (a.compare("++X") == 0){
+ ++c;
+ } else if (a.compare("--X") == 0){
+ --c;
+ } else {
+ c--;
+ }
+ }
+ cout<<c;
+ return 0;
+}