This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
s = input()
n = 0
for i in s:
if i == "?":
n += 1
s = s.replace("?", "'?'")
mini = min
maxi = max
def min(a,b):
if a=="?" or b=="?":
return 1
else:
return mini(a,b)
def max(a,b):
if a=="?":
a = 1
if b=="?":
b = 1
return a+b
l = eval(s)
def max(a,b):
if a=="?" or b=="?":
return 1
else:
return mini(a,b)
def min(a,b):
if a=="?":
a = 1
if b=="?":
b = 1
return a+b
r = n-eval(s)+1
print(r-l+1)
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |