Type: Default 1000ms 256MiB

ABC200B 200th

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Score : 200 points

Problem Statement

You are given an integer N.
Do the following operation K times on it and print the resulting integer.

  • If N is a multiple of 200, divide it by 200.
  • Otherwise, see N as a string and append 200 to the end of it.
    • For example, 7 would become 7200 and 1234 would become 1234200.

Constraints

  • All values in input are integers.
  • 1N105
  • 1K20

Input

Input is given from Standard Input in the following format:

N K

Output

Print the answer as an integer.


Sample Input 1

2021 4

Sample Output 1

50531

Applying the operation on N=2021 results in N becoming 20212021200101061010620050531.


Sample Input 2

40000 2

Sample Output 2

1

Sample Input 3

8691 20

Sample Output 3

84875488281

The answer may not fit into the signed 32-bit integer type.

摸底测试

Not Attended
Status
Done
Rule
IOI
Problem
8
Start at
2023-8-3 8:30
End at
2023-8-3 11:30
Duration
3 hour(s)
Host
Partic.
15