We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0866b0a commit 5d46152Copy full SHA for 5d46152
JYP/제로.py
@@ -0,0 +1,11 @@
1
+num = int(input())
2
+a = []
3
+
4
+for i in range(num):
5
+ b = int(input())
6
7
+ if b == 0:
8
+ a.pop()
9
+ else:
10
+ a.append(b)
11
+print(sum(a))
0 commit comments