Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import re
S = input().split("+")
ans = 0
for elem in S:
elem = elem.split("*")
if not("0" in elem):
ans += 1
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment