Skip to content

Commit aed54f2

Browse files
Create S1.py
1 parent 79ab7a8 commit aed54f2

File tree

1 file changed

+8
-0
lines changed
  • 2015/Senior Problems

1 file changed

+8
-0
lines changed

2015/Senior Problems/S1.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
l=[]
2+
for t in range(int(input())):
3+
c = int(input(''))
4+
if c!=0:
5+
l.append(c)
6+
else:
7+
l.pop(-1)
8+
print(sum(l))

0 commit comments

Comments
 (0)