858A.md (932B)
1 Source: https://codeforces.com/problemset/problem/858/A 2 3 A. k-rounding 4 5 time limit per test 6 7 1 second 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 standard input 16 17 output 18 19 standard output 20 21 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*. 22 23 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. 24 25 Write a program that will perform the *k*-rounding of *n*. 26 27 Input 28 29 The only line contains two integers *n* and *k* (1 ≤ *n* ≤ 109, 0 ≤ *k* ≤ 8). 30 31 Output 32 33 Print the *k*-rounding of *n*. 34 35 Examples 36 37 Input 38 39 ``` 40 375 4 41 ``` 42 43 Output 44 45 ``` 46 30000 47 ``` 48 49 Input 50 51 ``` 52 10000 1 53 ``` 54 55 Output 56 57 ``` 58 10000 59 ``` 60 61 Input 62 63 ``` 64 38101 0 65 ``` 66 67 Output 68 69 ``` 70 38101 71 ``` 72 73 Input 74 75 ``` 76 123456789 8 77 ``` 78 79 Output 80 81 ``` 82 12345678900000000 83 ```