Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
c = 1
if(k%2 == 0):
    print(-1)
else:
    for i in range(1,k):
      a = 7*((10**i - 1)//9)
      if(a%k == 0):
        break
      else:
        c += 1
    print(c)

Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Runtime Error):
k = int(input())
c = 1
for i in range(1,n):
  a = 7*((10**i - 1)//9)
  if(a%k == 0):
    break
  else:
    c += 1
print(c)


Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Runtime Error):
k = int(input())
b = 7
c = 1
a = []
e = 0
a.append(7)
if(k%2 == 0):
  print(-1)
else:
  while(b%k != 0):
    r = b%k
    b = 10*r+7
    c += 1
    if b in a:
      e = 1
  	a.append(b)
  if(e == 1):
    print(-1)
  else:
  	print(c)

  


Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Runtime Error):
k = int(input())
b = 7
c = 1
a = []
a.append(7)
if(k%2 == 0):
  print(-1)
else:
  while(b%k != 0):
    r = b%k
    b = 10*r+7
    c += 1
    if b in a:
      print(-1)
  	a.append(b)
  print(c)
  


Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
b = 7
c = 1
a = []
a.append(7)
if(k%2 == 0):
  print(-1)
else:
  while(b%k != 0):
    r = b%k
    b = 10*r+7
    c += 1
  a.append(b)
  print(c)
  

Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a = []
if(k%2 == 0):
  print(-1)
else:
    while(1):
        a.append(7)
        b = ''.join(map(str,a))
        b = int(b)
        #print(b)
        if(b%k == 0):
            break
    print(len(a))


Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
a = []
if(k%2 == 0):
  print(-1)
else:
    while(1):
        a.append(7)
        b = ''.join(map(str,a))
        b = int(b)
        #print(b)
        if(b%k == 0):
            break
    print(len(a))

    

Fixed submission:
k = int(input())
n = 7
c = 1
if(k%2 == 0):
  print(-1)
else:
  while(True):
    if(n%k == 0):
      break
    if(c > k):
      c = -1
      break
    r = n%k
    n = 10*r+7
    c += 1
  print(c)