For this Question: Let's define two functions G(X) and F(X) where G(X) will give us the closest prime greater than or equal to X and F(X) will give us the smallest digit (0-9) in X. 

Given two integers N and M, Your task is to print the value the sum of values of F(G(i)) for each I from N to M.

<b>Note</b>:- 
We have already provided you the function G(X) which returns the closest prime greater than or equal to X. To use the given function you have to call <b>next_prime(x)</b>.

<b>Note</b>:- Do not close your main class.The input contains two space- separated integers depicting the values of N and M.

Constraints:-
1 <= N <= M <= 10000Print the sum of F(G(i)) for each i from N to M.Sample Input:-
1 10

Sample Output:-
34

Explanation:-
Numbers:- 1 2 3 4 5 6 7 8 9 10
G(i):- 2 2 3 5 5 7 7 11 11 11
F(G(i)):- 2 2 3 5 5 7 7 1 1 1 
Sum=34

Sample Input:-
8 11

Sample Output:-
4, I have written this Solution Code: import math

def smallest(C):
    arr = []
    while C != 0 :
        a = C%10
        arr.append(a)
        C = int(C/10)
    temp = 10
    for i in range(len(arr)):
        if arr[i] < temp:
            temp = arr[i]
    return temp


def isprime(B):
    if B == 1:
        return False
    sqrt = int(math.sqrt(B))
    for i in range(2, sqrt+1):
        if B % i == 0:
            return False
    return True

def gprime(A):
    for i in range(A, 100000):
        if isprime(i):
            return i

def numbers(N,M):
    gi = []
    for i in range(N,M+1):
        gi.append(gprime(i))
    fgi = []
    for i in range(len(gi)):
        fgi.append(smallest(gi[i]))
    return sum(fgi)


inp = list(map(int , input().split()))
print(numbers(inp[0],inp[1])), In this Programming Language: Python, Now tell me if this Code is compilable or not?