For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros in base 10 and is divisible by n.

For example, 4-rounding of 375 is 375·80 = 30000. 30000 is the minimum integer such that it ends with 4 or more zeros and is divisible by 375.

Write a program that will perform the k-rounding of n.


-----Input-----

The only line contains two integers n and k (1 ≤ n ≤ 10^9, 0 ≤ k ≤ 8).


-----Output-----

Print the k-rounding of n.


-----Examples-----
Input
375 4

Output
30000

Input
10000 1

Output
10000

Input
38101 0

Output
38101

Input
123456789 8

Output
12345678900000000

Difficulty: interview

Starter code:

Solutions:
def main():
	n, k = map(int, input().split())
	num_2 = 0
	num_5 = 0
	x = n
	while (x % 2 == 0):
		num_2 += 1
		x //= 2
		
	while (x % 5 == 0):
		num_5 += 1
		x //= 5
	num_2 = k - min(num_2, k)
	num_5 = k - min(num_5, k)
	print(n * 5 ** num_5 * 2 ** num_2)


main()

a, b = map(int, input().split(' '))
aa=a
fives = 0
while a%5==0:
	fives += 1
	a /= 5
twos = 0
while a%2==0:
	twos += 1
	a /= 2
x=1

if fives<b:
	x *= 5**(b-fives)
if twos<b:
	x *= 2**(b-twos)

print(x*aa)

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

n, k = list(map(int, input().split()))
print(n // gcd(n, 10**k) * 10 ** k)

a,b=list(map(int,input().split()))
for i in range(b):
    if a%2==0:
        a//=2
    if a%5==0:
        a//=5
b=10**b
print(a*b)


n, k = map(int, input().split())
k = 10 ** k

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

print(n // gcd(n, k) * k)

n,k=map(int,input().split())
a=10**k
def lcm(a,b):
    m = a*b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a+b)
print(lcm(n,a))

n, k = [int(i) for i in input().split()]
t1 = 0
while t1 < k and n % 5 == 0:
    t1 += 1
    n //= 5
t1 = 0
while t1 < k and n % 2 == 0:
    t1 += 1
    n //= 2
print(n * (10**k))



def nod(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def nok(a, b):
    return a * b // nod(a, b)

n, k = list(map(int, input().split()))
print(nok(n, 10 ** k))


def gsd(a,b):
    if b == 0:
        return a
    return gsd(b, a % b)
n, k = list(map(int, input().split()))
print(n * (10 ** k // gsd(n, 10**k)))


from math import gcd
n, k = list(map(int, input().split()))
print(10 ** k * n // gcd(10 ** k, n))


n, k = [int(x) for x in input().split()]
n1 = n
cnt5 = cnt2 = 0
for i in range(k):
    if n1 % 2 == 0:
        n1 //= 2
        cnt2 += 1
    else:
        break
for i in range(k):
    if n1 % 5 == 0:
        n1 //= 5
        cnt5 += 1
    else:
        break
if cnt2 >= k and cnt5 >= k:
    print(n)
else:
    print(n * 2 ** (k - cnt2) * 5 ** (k - cnt5))

def gcd(a, b):
    if (b == 0):
        return a
    else:
        return gcd(b, a % b)

n, k = map(int, input().split())
l = 1
for i in range(k):
    l *= 10
print(str(n // gcd(n, l)) + "0" * k)

def nok(a,b):
    m = a*b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a+b)
n,k = list(map(int, input().split()))
print(nok(n,10**k))


def nok(a, b):
    c = a*b
    while (a!=0) and (b!=0):
        if a>b: a%=b;
        else: b%=a;
    return c//(a+b);

nk = input().split()
n, k = int(nk[0]), int(nk[1])
print (nok(10**k, n))

n, k = [int(i) for i in input().split()]
kol2 = 0
kol5 = 0
n1 = n
while (n1 % 5 == 0):
    n1 /= 5
    kol5 += 1
n1 = n
while (n1 % 2 == 0):
    n1 /= 2
    kol2 += 1
while (k - kol2 > 0):
    n *= 2
    kol2 += 1
while (k - kol5 > 0):
    n *= 5
    kol5 += 1
print(n)

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a


n, k = map(int, input().split())
n1 = n
k1 = k
a = n1 // gcd(n, 10 ** k) * 10 ** k1
print(a)

def gcd(a, b):
    if(b == 0):
        return a
    else:
        return(gcd(b, a % b))

def lcm(a, b):
    return a // gcd(a, b) * b

a, b = map(int, input().split())
b = 10**b
print(lcm(max(a, b), min(a, b)))

import math


def ria():
    return [int(i) for i in input().split()]


n,k=ria()

g=math.gcd(n,10**k)
print(n*(10**k)//g)

n, k = map(int, input().split())
for i in range(k):
    if n % 5 == 0:
        n //= 5
    if n % 2 == 0:
        n //= 2
print(n * 10 ** k)

m, k = list(map(int, input().split()))
n = m
twos = 0
fives = 0
while(n%2==0) or (n%5==0):
    if n%2 == 0:
        twos += 1
        n //= 2
    if n%5 == 0:
        fives += 1
        n //= 5
final = n * 2 ** max(k, twos) * 5 ** max(k,fives)
print(final)


from math import gcd

n, k = list(map(int , input().split()))
l = n * (10 ** k)
g = gcd(n, 10 ** k)
print(l // g)

n,k=map(int,input().split())

def gcd(x, y):
   while(y):
       x, y = y, x % y
   return x

def lcm(x, y):
   lcm = (x*y)//gcd(x,y)
   return lcm


print(lcm(n,10**k))

def rec(i):
    nonlocal a
    return i
import sys
from collections import Counter
sys.setrecursionlimit(10**6)
#n=int(input())
a,b=list(map(int,input().split()))
z=a
c=0
while a%5==0:
    c=c+1
    a=a//5
d=0
while a%2==0:
    d=d+1
    a=a//2
#c=min(b,c)
#d=min(b,d)
for i in range(b-c):
    z=z*5
for i in range(b-d):
    z=z*2
print(z)


q,w=list(map(int,input().split()))
z,x=0,0
e=q
while e%5==0:
    z+=1
    e//=5
while e%2==0:
    x+=1
    e//=2
if w>z:
    z=w-z
else:
    z=0
if w>x:
    x=w-x
else:
    x=0
print(q*(5**z)*(2**x))


import math

a,b = list(map(int, input().split()))
d = a
cnt_2 = 0
cnt_5 = 0
while a % 2 == 0:
    a /= 2
    cnt_2 += 1

while a % 5 == 0:
    a /= 5
    cnt_5 += 1
umn = 1
cnt_2_raz = max(b - cnt_2, 0)
cnt_5_raz = max(b - cnt_5, 0)

while cnt_2_raz > 0:
    umn *= 2
    cnt_2_raz -= 1

while cnt_5_raz > 0:
    umn *= 5
    cnt_5_raz -= 1
print(d * umn)