Buggy python submission (verdict: Runtime Error):

def a(t,i):
    if i= len(s)-1:
        return sum(map(int,t.split('+')))
    return a(t+s[i+1],i+1) + a(t+'+'+s[i+1],i+1) #関数の中に入れると最後の項でまとめて処理できる
s = input()
print(a(s[0],0))

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
#入力
#関数へ
#関数
    #
def a(t,i):
    if j = len(s)-1:
        return sum(map(int,t.split('+')))
    return a(t+s[i+1],i+1) + a(t+'+'+s[i+1],i+1) #関数の中に入れると最後の項でまとめて処理できる
s = input()
print(a(s[0],0))

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(t,i):
    if i == n-1:
        return sum(map(int,t.split()))
    return a(t+s[i+1],i+1)+ a(t+"+"+s[i+1],i+1)

s = input()
n = len(s)
i=0
print(a(s[0],0))


Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(t,i):
    if i == n-1:
        return sum(map(int,t.split()))
    return a(t+s[i+1],i+1)+ a(t+"+"+s[i+1])

s = input()
n = len(s)
print(a(s[0],0))


Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(s,i):
    if i == n-1:
        return sum(map(int,s.split()))
    return a(s[i]+s[i+1],i+1)+ a(s[i]+"+"+s[i+1])

s = input()
n = len(s)
i=0
print(a(s[0],0))


Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(s,i):
    if i == n-1:
        return eval(s)
    return a(s[i]+s[i+1],i+1)+ a(s[i]+"+"+s[i+1])

s = input()
n = len(s)
i=0
print(a(s[0],0))

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(s,i):
    if i == l-1:
        return sum(map(int,s.split("+")))
    return a(s+s[i+1],i+1)+a(s+"+"+s[i+1],i+1)
s = input()
l = len(s)
print(a(s[0],0))

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(t,i):
    if i==l-1:
        return sum(map(int,t.split('+'))))
    return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)
s=input()
l = len(s)
print(a(s[0],0))


Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):

def a(t,i):
    if i==l-1:
        print(sum(map(int,t.split('+'))))
        exit()
    return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)

s=input()
a(s[0],0)
l = len(s)

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):

def a(t,i):
    if i==l-1:
        print(sum(map(int,t.split('+'))))
        exit()
    return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)

s=input()
a(s[0],0)
l = s.len()

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):

def a(t,i):
    if i==l-1:
        print(sum(map(int,t.split('+'))))
        exit()
    a(t+s[i+1])+a(t+'+'+s(i+1))

s=input()
a(s[0],0)
l = s.len()

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):


def a(t,i):
    if i==l-1:
        print(sum(int(t.split('+'))))
        exit()
    a(t+s[i+1])+a(t+'+'+s(i+1))

s=input()
a(s[0],0)
l = s.len()

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def a(t,i):
    if i=l-1:
        print(sum(int(t.split('+'))))
        exit()
    a(t+s[i+1])+a(t+'+'+s(i+1))

s=input()
a(s[0],0)
l = s.len()

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)

Buggy python submission (verdict: Runtime Error):
def dfs(i,Str):
    if i==n:
        return sum(map(int,Str.split()))
    return dfs(i+1,Str+S[i+1])+dfs(i+1,Str+"+"+S[i+1])
S=input()
n=len(S)
print(dfs(0,S[0]))

Fixed submission:
def dfs(i,s):
    if i==n-1:
        return sum(map(int,s.split('+')))
    return dfs(i+1,s+S[i+1])+dfs(i+1,s+'+'+S[i+1])

S=input()
n=len(S)
ans=dfs(0,S[0])
print(ans)