Buggy python submission (verdict: Runtime Error):
import math

def Repsept():
    
    num = int(input())

    seven_yes = num % 7
    eleven_yes = num % 11
    mod_value = 1

    count = 1
    
    if num % 2 != 0 and num % 5 != 0:
    
        if not is_prime(num):
        
            while mod_value != 0:
                value = 7*(pow(10, count)-1)/9
                
                mod_value = value % num
    
                if mod_value != 0:
                    count = count + 1
    
            print(count)
                
        else:
            
            print(num-1)

    else:
    
        print(-1)


def is_prime(n):
    if n == 1: 
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


if __name__ == '__main__':
    Repsept()



Fixed submission:
def Repsept():
    
    num = int(input())

    f=0
    n=num
    
    for i in range(10**6+1):
      if n==0:
        f=1
        print(i)
        break
      n=((n*10)+7)%num
    if f==0:
      print(-1)


if __name__ == '__main__':
    Repsept()

Buggy python submission (verdict: Runtime Error):
import math

def Repsept():
    
    num = int(input())

    seven_yes = num % 7
    eleven_yes = num % 11
    mod_value = 1

    count = 1
    
    if num % 2 != 0:
    
        if seven_yes == 0 or eleven_yes == 0 or num < 10000:
        
            while mod_value != 0:
                value = 7*(pow(10, count)-1)/9
                
                mod_value = value % num
    
                if mod_value != 0:
                    count = count + 1
    
            print(count)
                
        else:
            
            print(num-1)

    else:
    
        print(-1)


def is_prime(n):
    if n == 1: 
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


if __name__ == '__main__':
    Repsept()



Fixed submission:
def Repsept():
    
    num = int(input())

    f=0
    n=num
    
    for i in range(10**6+1):
      if n==0:
        f=1
        print(i)
        break
      n=((n*10)+7)%num
    if f==0:
      print(-1)


if __name__ == '__main__':
    Repsept()

Buggy python submission (verdict: Runtime Error):
import math

def Repsept():
    
    num = int(input())

    mod_value = 1

    count = 1
    
    

    if num % 2 != 0:

        if is_prime(num):
                    
            while mod_value != 0:
                value = 7*(pow(10, count)-1)/9
                
                mod_value = value % num
    
                if mod_value != 0:
                    count = count + 1
    
            print(count)
            
        else:
            
            print(num-1)
        
    else:
    
        print(-1)

def is_prime(n):
    if n == 1: 
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

if __name__ == '__main__':
    Repsept()



Fixed submission:
def Repsept():
    
    num = int(input())

    f=0
    n=num
    
    for i in range(10**6+1):
      if n==0:
        f=1
        print(i)
        break
      n=((n*10)+7)%num
    if f==0:
      print(-1)


if __name__ == '__main__':
    Repsept()

Buggy python submission (verdict: Runtime Error):
def Repsept():
    
    num = int(input())

    mod_value = 1

    count = 1

    if num % 2 != 0:

        while mod_value != 0:
            value = 7*(pow(10, count)-1)/9.
            
            mod_value = value % num
            
            if mod_value != 0:
                count = count + 1

        print(count)
        
    else:
    
        print(-1)

if __name__ == '__main__':
    Repsept()



Fixed submission:
def Repsept():
    
    num = int(input())

    f=0
    n=num
    
    for i in range(10**6+1):
      if n==0:
        f=1
        print(i)
        break
      n=((n*10)+7)%num
    if f==0:
      print(-1)


if __name__ == '__main__':
    Repsept()