Buggy python submission (verdict: Runtime Error):
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
for i in range(2,N-1):
    A = i
    B = N - i
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

Fixed submission:
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))

Buggy python submission (verdict: Runtime Error):
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    if num > 0:
        while num > 0:
            list_b.append(num % 10)
            num = num // 10
        for i in range(len(list_b)):
            k += list_b[i]
        return k 

list_a =[]
for i in range(N-2):
    A = i + 2
    B = N - i - 2   
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

Fixed submission:
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))

Buggy python submission (verdict: Runtime Error):
# AGC 025 A - Digits Sum
N = int(input())

def sum_of(num): #各位の合計値を返す
    list_b = []
    k = 0
    if num > 0:
        while num > 0:
            list_b.append(num % 10)
            num = num // 10
        for i in range(len(list_b)):
            k += list_b[i]
        return k 
    if num == 0:
        return 0 

list_a =[]
for i in range(N-2):
    A = i + 2
    B = N - i - 2   
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

Fixed submission:
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))

Buggy python submission (verdict: Runtime Error):
# AGC 025 A - Digits Sum
N = int(input())

def sum_of(num): #各位の合計値を返す
    list_b = []
    k = 0
    if num > 0:
        while num > 0:
            list_b.append(num % 10)
            num = num // 10
        for i in range(len(list_b)):
            k += list_b[i]
        return k 
    if num <= 0:
        next
        

list_a =[]
for i in range(N-2):
    A = i + 2
    B = N - i - 2   
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

Fixed submission:
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))

Buggy python submission (verdict: Runtime Error):
# AGC 025 A - Digits Sum
N = int(input())

def sum_of(num): #各位の合計値を返す
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num % 10)
        num = num // 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
for i in range(N-2):
    A = i + 2
    B = N - i - 2   
    list_a.append(sum_of(A) + sum_of(B))
    
print(min(list_a))

Fixed submission:
N = int(input())

def sum_of(num): 
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num%10)
        num //= 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
if N == 2:
    print(str(2))
if N == 3:
    print(str(3))
if N >= 4:
    for i in range(2,N-1):
        A = i
        B = N - i
        list_a.append(sum_of(A) + sum_of(B))
    print(min(list_a))