#abc200b. B - 200th ABC-200

B - 200th ABC-200

Score : 200200 points

## 问题描述

给定一个整数 $N$。

对其执行以下操作 $K$ 次,并打印出最终的整数。

-   如果 $N$ 是 $200$ 的倍数,则将它除以 $200$。
-   否则,将 $N$ 视为字符串并在其末尾添加 $200$。
    -   例如,$7$ 将变为 $7200$,而 $1234$ 将变为 $1234200$。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

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

  • If NN is a multiple of 200200, divide it by 200200.
  • Otherwise, see NN as a string and append 200200 to the end of it.
    • For example, 77 would become 72007200 and 12341234 would become 12342001234200.

Constraints

  • All values in input are integers.
  • 1N1051 \le N \le 10^5
  • 1K201 \le K \le 20

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the answer as an integer.

Sample Input 1

2021 4

Sample Output 1

50531

Applying the operation on N=2021N=2021 results in NN becoming $2021 \rightarrow 2021200 \rightarrow 10106 \rightarrow 10106200 \rightarrow 50531$.

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 3232-bit integer type.

update @ 2024/3/10 09:11:23