| 比赛 | EYOI与SBOI开学欢乐赛11th | 评测结果 | WWWTTTTTTT | 
|---|---|---|---|
| 题目名称 | WHZ 的数字 | 最终得分 | 0 | 
| 用户昵称 | ZRQ | 运行时间 | 7.000 s | 
| 代码语言 | C++ | 内存使用 | 4.01 MiB | 
| 提交时间 | 2022-10-14 21:56:04 | ||
#include<iostream>
#include<cstdio> 
using namespace std;
long long n,k;
char ch;
void add(int x)
{
	while(x)
	{
		if(x-x/10*10==0) --k;
		x/=10;
	}
	return ;
}// 寄! 
int main()
{
	freopen("whz_number.in","r",stdin);
	freopen("whz_number.out","w",stdout);
	while(~scanf("%lld%lld",&n,&k))
	{
		while(n>=0&&k>0) add(n),--n;
		printf("%lld\n",n+1);
	}
	return 0;
}