简单游戏

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.

Background

土拨鼠瑞嘉都会做的简单游戏

Description

给你两个个数字n,kn, k, 对数字nn进行kk次操作, 对于每一次操作, 如果nn的个位数非0, 则减1, 否则nn缩小10倍.

Format

Input

两个整数n,kn, k

Output

输出最后的结果

Samples

512 4
50
1000000000 9
1

Limitation

1s, 1024KiB for each test case.

大明

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
38
Start at
2025-2-11 16:00
End at
2025-2-28 8:00
Duration
400 hour(s)
Host
Partic.
7