← Back to List

4375번: 1 ↗

Solutions

Python 3
191 B | 191 chars
while True:
    a = 0
    try:
        a = int(input())
    except:
        break
    k = 1
    c = 0
    while(k % a !=0):
        k*=10
        k+=1
        k%=a
        c+=1
    print(c+1)