For this Question: We define a weird series as follows:
7, 77, 777, 7777, 77777, 777777,. .
Given a positive integer N find where is first occurrence of a number divisible by N in the given series.
If the series contains no multiple of N, print -1 instead.Input contains a single integer N.

Constraints:
1 <= N <= 1000000Print the position of the first position of a multiple of N in the series. (For example, if the first occurrence is the third element of the series, print 3)Sample Input 1
101

Sample Output 1
4

Explanation: 7, 77, 777 are not multiple of 101 whereas 7777 is a multiple of 101.

Sample Input 2
2

Sample Output 2
-1

Sample Input 3
7

Sample Output 3
1, I have written this Solution Code: a = int(input())
lst = 0
ans = 1
if(a%2!=0 and a%5!=0 and a%17!=0):
    lst = 7%a
    while(lst!=0):
        ans = ans+1
        lst*=10
        lst=lst+7
        lst%=a
    print(ans)
else:
    print("-1", end=""), In this Programming Language: Python, Now tell me if this Code is compilable or not?