#B. B - 200th ABC-200

    传统题 1000ms 256MiB

B - 200th ABC-200

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

B - 200th ABC-200

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.
  • $1 \le N \le 10^5$
  • $1 \le K \le 20$

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the answer as an integer.


2021 4
50531

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


40000 2
1

8691 20
84875488281

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

2025寒假ATC码力训练营第十四次练习

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-2-7 13:00
结束于
2025-2-7 14:30
持续时间
1.5 小时
主持人
参赛人数
6