Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Created July 15, 2017 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IKKO-Ohta/146976037160970d5bde849fcd19b6d4 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/146976037160970d5bde849fcd19b6d4 to your computer and use it in GitHub Desktop.
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